mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Merge pull request #1628 from tgstation/LinusTechTipsIsCancelled
Removes "Based on What?" meme
This commit is contained in:
+2
-2
@@ -5,9 +5,9 @@
|
||||
<PropertyGroup>
|
||||
<TgsCoreVersion>6.0.0</TgsCoreVersion>
|
||||
<TgsConfigVersion>5.0.0</TgsConfigVersion>
|
||||
<TgsApiVersion>9.12.0</TgsApiVersion>
|
||||
<TgsApiVersion>10.0.0</TgsApiVersion>
|
||||
<TgsCommonLibraryVersion>6.0.0</TgsCommonLibraryVersion>
|
||||
<TgsApiLibraryVersion>11.1.0</TgsApiLibraryVersion>
|
||||
<TgsApiLibraryVersion>12.0.0</TgsApiLibraryVersion>
|
||||
<TgsClientVersion>13.0.0</TgsClientVersion>
|
||||
<TgsDmapiVersion>6.5.2</TgsDmapiVersion>
|
||||
<TgsInteropVersion>5.6.1</TgsInteropVersion>
|
||||
|
||||
@@ -19,12 +19,6 @@ namespace Tgstation.Server.Api.Models
|
||||
/// <remarks>See https://discordapp.com/developers/docs/topics/oauth2#bots</remarks>
|
||||
public string? BotToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="bool"/> to enable based mode. Will auto reply with a youtube link to a video that says "based on the hardware that's installed in it" to anyone saying 'based on what?' case-insensitive.
|
||||
/// </summary>
|
||||
[Obsolete("Will be removed in next major TGS version")]
|
||||
public bool BasedMeme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If the tgstation-server logo is shown in deployment embeds.
|
||||
/// </summary>
|
||||
@@ -35,6 +29,11 @@ namespace Tgstation.Server.Api.Models
|
||||
/// </summary>
|
||||
public DiscordDMOutputDisplayType DMOutputDisplay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Currently unused. Note its origin in based meme before repurposing.
|
||||
/// </summary>
|
||||
readonly bool unusedFlag;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DiscordConnectionStringBuilder"/> class.
|
||||
/// </summary>
|
||||
@@ -60,10 +59,7 @@ namespace Tgstation.Server.Api.Models
|
||||
DMOutputDisplay = dMOutputDisplayType;
|
||||
|
||||
if (splits.Length > 2 && Int32.TryParse(splits[2], out Int32 basedMeme))
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
BasedMeme = Convert.ToBoolean(basedMeme);
|
||||
else
|
||||
BasedMeme = false; // oranges said this needs to be true by default :pensive:
|
||||
unusedFlag = Convert.ToBoolean(basedMeme);
|
||||
|
||||
if (splits.Length > 3 && Int32.TryParse(splits[3], out Int32 branding))
|
||||
DeploymentBranding = Convert.ToBoolean(branding);
|
||||
@@ -72,7 +68,6 @@ namespace Tgstation.Server.Api.Models
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString() => $"{BotToken};{(int)DMOutputDisplay};{Convert.ToInt32(BasedMeme)};{Convert.ToInt32(DeploymentBranding)}";
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
public override string ToString() => $"{BotToken};{(int)DMOutputDisplay};{Convert.ToInt32(unusedFlag)};{Convert.ToInt32(DeploymentBranding)}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,11 +82,6 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
/// </summary>
|
||||
readonly object connectDisconnectLock;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="bool"/> to enable based mode. Will auto reply with a youtube link to a video that says "based on the hardware that's installed in it" to anyone saying 'based on what?' case-insensitive.
|
||||
/// </summary>
|
||||
readonly bool basedMeme;
|
||||
|
||||
/// <summary>
|
||||
/// If the tgstation-server logo is shown in deployment embeds.
|
||||
/// </summary>
|
||||
@@ -199,9 +194,6 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
|
||||
var csb = new DiscordConnectionStringBuilder(chatBot.ConnectionString);
|
||||
var botToken = csb.BotToken;
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
basedMeme = csb.BasedMeme;
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
outputDisplayType = csb.DMOutputDisplay;
|
||||
deploymentBranding = csb.DeploymentBranding;
|
||||
|
||||
@@ -516,22 +508,6 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
FailIfNotExists = false,
|
||||
};
|
||||
|
||||
if (basedMeme && messageCreateEvent.Content.Equals("Based on what?", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
await SendMessage(
|
||||
new DiscordMessage
|
||||
{
|
||||
MessageReference = messageReference,
|
||||
},
|
||||
new MessageContent
|
||||
{
|
||||
Text = "https://youtu.be/LrNu-SuFF_o",
|
||||
},
|
||||
messageCreateEvent.ChannelID.Value,
|
||||
cancellationToken);
|
||||
return Result.FromSuccess();
|
||||
}
|
||||
|
||||
var channelsClient = serviceProvider.GetRequiredService<IDiscordRestChannelAPI>();
|
||||
var channelResponse = await channelsClient.GetChannelAsync(messageCreateEvent.ChannelID, cancellationToken);
|
||||
if (!channelResponse.IsSuccess)
|
||||
|
||||
Reference in New Issue
Block a user