Skip to content

Commit

Permalink
the long awaited reminders rewrite (w/ timeout)
Browse files Browse the repository at this point in the history
Signed-off-by: RedGuy12 <paul@reid-family.org>
  • Loading branch information
cobaltt7 committed Aug 7, 2023
1 parent 4e22e65 commit b3d0505
Show file tree
Hide file tree
Showing 8 changed files with 613 additions and 543 deletions.
8 changes: 7 additions & 1 deletion modules/punishments/ban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import {
import constants from "../../common/constants.js";
import { disableComponents } from "../../util/discord.js";
import { parseTime } from "../../util/numbers.js";
import { SpecialReminders, remindersDatabase } from "../reminders.js";
import { SpecialReminders, remindersDatabase } from "../reminders/misc.js";
import { client } from "strife.js";
import config from "../../common/config.js";
import { escapeMessage } from "../../util/markdown.js";
import queueReminders from "../reminders/send.js";

export default async function ban(interaction: ChatInputCommandInteraction<"cached" | "raw">) {
const memberToBan = interaction.options.getMember("user");
Expand Down Expand Up @@ -56,6 +57,8 @@ export default async function ban(interaction: ChatInputCommandInteraction<"cach
reminder: userToBan.id,
},
];
await queueReminders();

await interaction.reply(
`${
constants.emojis.statuses.yes
Expand All @@ -73,6 +76,8 @@ export default async function ban(interaction: ChatInputCommandInteraction<"cach
reminder.reminder === userToBan.id
),
);
await queueReminders();

await interaction.reply(
`${
constants.emojis.statuses.yes
Expand Down Expand Up @@ -149,6 +154,7 @@ export default async function ban(interaction: ChatInputCommandInteraction<"cach
reminder: userToBan.id,
},
];
await queueReminders();

await userToBan
?.send({
Expand Down
Loading

0 comments on commit b3d0505

Please sign in to comment.