Skip to content

Commit 1186caf

Browse files
Techbot121Meta Construct
authored andcommitted
always remember last reaction user
1 parent 423d6f9 commit 1186caf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/services/discord/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ export class DiscordBot extends Service {
173173
try {
174174
const guild = this.getGuild();
175175
if (!guild) return false;
176-
176+
177177
const bannerURL = guild.bannerURL({ size: 4096 });
178178
if (bannerURL) {
179179
const bannerBase64 = await getAsBase64(bannerURL);
180180
this.data.lastDiscordBanner = bannerBase64 ?? this.data.lastDiscordBanner;
181181
await this.data.save();
182182
}
183-
183+
184184
await guild.setBanner(url, reason);
185185
return true;
186186
} catch {

app/services/discord/modules/shitposting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ export default async (bot: DiscordBot) => {
377377
await bot.container.getService("Markov")
378378
).generate(reaction.emoji.toString(), DefaultMarkovConfig);
379379
if (mk) {
380-
lastReactionUserId = user.id;
381380
lastRespondedReactionMsgs.push(message.id);
382381
await (message.channel as Discord.TextChannel)
383382
.send(`${user.mention} ` + mk)
384383
.catch();
385384
}
386385
}
386+
lastReactionUserId = user.id;
387387
});
388388

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

0 commit comments

Comments
 (0)