mirror of
https://github.com/Brazmann/SuperMachoBot.git
synced 2024-12-22 21:26:41 +00:00
Attempt at double-gem/coal fix.
-Attempt to fix bug that allows for a message to be gemmed/coaled twice if done fast enough, by having it write the log for the pin earlier.
This commit is contained in:
parent
e9d7876620
commit
ad327b8595
|
@ -43,7 +43,7 @@ namespace SuperMachoBot
|
||||||
};
|
};
|
||||||
|
|
||||||
databasePath = configItems[0].EconomyDatabasePath;
|
databasePath = configItems[0].EconomyDatabasePath;
|
||||||
discord.MessageReactionAdded += async (s, e) => //Spaghetti central.
|
discord.MessageReactionAdded += async (s, e) =>
|
||||||
{
|
{
|
||||||
try //I don't think this is good practice. Fuck it.
|
try //I don't think this is good practice. Fuck it.
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ namespace SuperMachoBot
|
||||||
{
|
{
|
||||||
string thumbnailURL = GetRelevantEmbedURL(message);
|
string thumbnailURL = GetRelevantEmbedURL(message);
|
||||||
string desc = "";
|
string desc = "";
|
||||||
|
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/Pinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
||||||
if (message.Content != "")
|
if (message.Content != "")
|
||||||
{
|
{
|
||||||
desc = $@"""{message.Content}""";
|
desc = $@"""{message.Content}""";
|
||||||
|
@ -76,7 +76,6 @@ namespace SuperMachoBot
|
||||||
Color = DiscordColor.PhthaloBlue
|
Color = DiscordColor.PhthaloBlue
|
||||||
}.AddField("Gem:", $"[link]({message.JumpLink})").Build();
|
}.AddField("Gem:", $"[link]({message.JumpLink})").Build();
|
||||||
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, bruhgimus);
|
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, bruhgimus);
|
||||||
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/Pinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +91,7 @@ namespace SuperMachoBot
|
||||||
{
|
{
|
||||||
string thumbnailURL = GetRelevantEmbedURL(message);
|
string thumbnailURL = GetRelevantEmbedURL(message);
|
||||||
string desc = "";
|
string desc = "";
|
||||||
|
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/UltraPinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
||||||
if (message.Content != "")
|
if (message.Content != "")
|
||||||
{
|
{
|
||||||
desc = $@"""{message.Content}""";
|
desc = $@"""{message.Content}""";
|
||||||
|
@ -108,7 +107,6 @@ namespace SuperMachoBot
|
||||||
Color = new DiscordColor("#66ff33")
|
Color = new DiscordColor("#66ff33")
|
||||||
}.AddField("Gemerald:", $"[link]({message.JumpLink})").Build();
|
}.AddField("Gemerald:", $"[link]({message.JumpLink})").Build();
|
||||||
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, bruhgimus);
|
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, bruhgimus);
|
||||||
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/UltraPinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,6 +123,8 @@ namespace SuperMachoBot
|
||||||
string thumbnailURL = GetRelevantEmbedURL(message);
|
string thumbnailURL = GetRelevantEmbedURL(message);
|
||||||
string desc = "";
|
string desc = "";
|
||||||
|
|
||||||
|
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/Pinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
||||||
|
|
||||||
if (message.Content != "")
|
if (message.Content != "")
|
||||||
{
|
{
|
||||||
desc = $@"""{message.Content}""";
|
desc = $@"""{message.Content}""";
|
||||||
|
@ -140,7 +140,6 @@ namespace SuperMachoBot
|
||||||
Color = DiscordColor.Black
|
Color = DiscordColor.Black
|
||||||
}.AddField("Coal:", $"[link]({message.JumpLink})").Build();
|
}.AddField("Coal:", $"[link]({message.JumpLink})").Build();
|
||||||
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, embed);
|
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, embed);
|
||||||
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/Pinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,6 +156,8 @@ namespace SuperMachoBot
|
||||||
string thumbnailURL = GetRelevantEmbedURL(message);
|
string thumbnailURL = GetRelevantEmbedURL(message);
|
||||||
string desc = "";
|
string desc = "";
|
||||||
|
|
||||||
|
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/UltraPinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
||||||
|
|
||||||
if (message.Content != "")
|
if (message.Content != "")
|
||||||
{
|
{
|
||||||
desc = $@"""{message.Content}""";
|
desc = $@"""{message.Content}""";
|
||||||
|
@ -172,7 +173,6 @@ namespace SuperMachoBot
|
||||||
Color = DiscordColor.DarkRed
|
Color = DiscordColor.DarkRed
|
||||||
}.AddField("Brimstone:", $"[link]({message.JumpLink})").Build();
|
}.AddField("Brimstone:", $"[link]({message.JumpLink})").Build();
|
||||||
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, embed);
|
await discord.SendMessageAsync(discord.GetChannelAsync(config[0].gemboardChannelId).Result, embed);
|
||||||
File.AppendAllText($"{databasePath}/{message.Channel.GuildId}/UltraPinned.txt", message.Id.ToString() + $",{message.Author.Id}\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue