Skip to content

Commit

Permalink
always remember last reaction user
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 authored and Meta Construct committed Jan 29, 2025
1 parent 423d6f9 commit 1186caf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/services/discord/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ export class DiscordBot extends Service {
try {
const guild = this.getGuild();
if (!guild) return false;

const bannerURL = guild.bannerURL({ size: 4096 });
if (bannerURL) {
const bannerBase64 = await getAsBase64(bannerURL);
this.data.lastDiscordBanner = bannerBase64 ?? this.data.lastDiscordBanner;
await this.data.save();
}

await guild.setBanner(url, reason);
return true;
} catch {
Expand Down
2 changes: 1 addition & 1 deletion app/services/discord/modules/shitposting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ export default async (bot: DiscordBot) => {
await bot.container.getService("Markov")
).generate(reaction.emoji.toString(), DefaultMarkovConfig);
if (mk) {
lastReactionUserId = user.id;
lastRespondedReactionMsgs.push(message.id);
await (message.channel as Discord.TextChannel)
.send(`${user.mention} ` + mk)
.catch();
}
}
lastReactionUserId = user.id;
});

bot.discord.on("messageCreate", async msg => {
Expand Down

0 comments on commit 1186caf

Please sign in to comment.