Removes "Based on what?" meme

Linus Tech Tips is cancelled
This commit is contained in:
Jordan Dominion
2023-08-15 18:48:38 -04:00
parent e6960db1e2
commit 261ac08985
6 changed files with 10 additions and 37 deletions
+2 -2
View File
@@ -5,9 +5,9 @@
<PropertyGroup>
<TgsCoreVersion>6.0.0</TgsCoreVersion>
<TgsConfigVersion>5.0.0</TgsConfigVersion>
<TgsApiVersion>9.11.1</TgsApiVersion>
<TgsApiVersion>10.0.0</TgsApiVersion>
<TgsCommonLibraryVersion>6.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>11.0.1</TgsApiLibraryVersion>
<TgsApiLibraryVersion>12.0.0</TgsApiLibraryVersion>
<TgsClientVersion>13.0.0</TgsClientVersion>
<TgsDmapiVersion>6.5.2</TgsDmapiVersion>
<TgsInteropVersion>5.6.1</TgsInteropVersion>
@@ -19,11 +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>
public bool BasedMeme { get; set; }
/// <summary>
/// If the tgstation-server logo is shown in deployment embeds.
/// </summary>
@@ -34,12 +29,17 @@ 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>
public DiscordConnectionStringBuilder()
{
BasedMeme = true;
}
/// <summary>
@@ -60,9 +60,7 @@ namespace Tgstation.Server.Api.Models
DMOutputDisplay = dMOutputDisplayType;
if (splits.Length > 2 && Int32.TryParse(splits[2], out Int32 basedMeme))
BasedMeme = Convert.ToBoolean(basedMeme);
else
BasedMeme = true; // 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);
@@ -71,6 +69,6 @@ namespace Tgstation.Server.Api.Models
}
/// <inheritdoc />
public override string ToString() => $"{BotToken};{(int)DMOutputDisplay};{Convert.ToInt32(BasedMeme)};{Convert.ToInt32(DeploymentBranding)}";
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,7 +194,6 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
var csb = new DiscordConnectionStringBuilder(chatBot.ConnectionString);
var botToken = csb.BotToken;
basedMeme = csb.BasedMeme;
outputDisplayType = csb.DMOutputDisplay;
deploymentBranding = csb.DeploymentBranding;
@@ -514,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)
@@ -149,7 +149,6 @@ namespace Tgstation.Server.Tests.Live.Instance
// needs to just be valid
connectionString = new DiscordConnectionStringBuilder
{
BasedMeme = true,
BotToken = "some_token",
DeploymentBranding = true,
DMOutputDisplay = DiscordDMOutputDisplayType.Never,
@@ -97,7 +97,6 @@ namespace Tgstation.Server.Tests.Live.Instance
// needs to just be valid
connectionString = new DiscordConnectionStringBuilder
{
BasedMeme = true,
BotToken = "some_token",
DeploymentBranding = true,
DMOutputDisplay = DiscordDMOutputDisplayType.Always,
@@ -168,7 +168,6 @@ static class Program
var discordSetupInfo = new DiscordSetupInfo(providerInfo);
csb = new DiscordConnectionStringBuilder
{
BasedMeme = false,
DMOutputDisplay = DiscordDMOutputDisplayType.Always,
BotToken = discordSetupInfo.BotToken
};