refactor(arabot): updated deprecated commands

This commit is contained in:
Anthony Berg 2024-01-04 10:38:39 +00:00
parent 3f82f87317
commit bb6ac8aef0
87 changed files with 110 additions and 107 deletions

View File

@ -22,7 +22,7 @@ import { ChannelType } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class AccessCommand extends Command { export class AccessCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'access', name: 'access',

View File

@ -22,7 +22,7 @@ import type { Message } from 'discord.js';
import { ChannelType, TextChannel } from 'discord.js'; import { ChannelType, TextChannel } from 'discord.js';
export class AnonymousCommand extends Command { export class AnonymousCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'anonymous', name: 'anonymous',

View File

@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
import type { Message } from 'discord.js'; import type { Message } from 'discord.js';
export class ClearCommand extends Command { export class ClearCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'clear', name: 'clear',

View File

@ -31,7 +31,7 @@ import {
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class PrivateCommand extends Subcommand { export class PrivateCommand extends Subcommand {
public constructor(context: Subcommand.Context, options: Subcommand.Options) { public constructor(context: Subcommand.LoaderContext, options: Subcommand.Options) {
super(context, { super(context, {
...options, ...options,
name: 'private', name: 'private',

View File

@ -24,7 +24,7 @@ import { getBalance } from '#utils/database/economy';
import { EmbedBuilder } from 'discord.js'; import { EmbedBuilder } from 'discord.js';
export class BalanceCommand extends Command { export class BalanceCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'balance', name: 'balance',

View File

@ -26,7 +26,7 @@ import { EmbedBuilder } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class DailyCommand extends Command { export class DailyCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'daily', name: 'daily',

View File

@ -25,7 +25,7 @@ import { EmbedBuilder, TextChannel } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class BalanceCommand extends Command { export class BalanceCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'pay', name: 'pay',

View File

@ -23,7 +23,7 @@ import { N1984 } from '#utils/gifs';
import { addFunLog, countTotal } from '#utils/database/fun'; import { addFunLog, countTotal } from '#utils/database/fun';
export class N1984Command extends Command { export class N1984Command extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: '1984', name: '1984',

View File

@ -23,7 +23,7 @@ import { Cringe } from '#utils/gifs';
import { addFunLog, countTotal } from '#utils/database/fun'; import { addFunLog, countTotal } from '#utils/database/fun';
export class CringeCommand extends Command { export class CringeCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'cringe', name: 'cringe',

View File

@ -22,7 +22,7 @@ import { EmbedBuilder } from 'discord.js';
import { Happy } from '#utils/gifs'; import { Happy } from '#utils/gifs';
export class HappyCommand extends Command { export class HappyCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'happy', name: 'happy',

View File

@ -23,7 +23,7 @@ import { Hugs } from '#utils/gifs';
import { addFunLog, countTotal } from '#utils/database/fun'; import { addFunLog, countTotal } from '#utils/database/fun';
export class HugCommand extends Command { export class HugCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'hug', name: 'hug',

View File

@ -23,7 +23,7 @@ import { Kill } from '#utils/gifs';
import { addFunLog, countTotal } from '#utils/database/fun'; import { addFunLog, countTotal } from '#utils/database/fun';
export class KillCommand extends Command { export class KillCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'kill', name: 'kill',

View File

@ -23,7 +23,7 @@ import { Poke } from '#utils/gifs';
import { addFunLog, countTotal } from '#utils/database/fun'; import { addFunLog, countTotal } from '#utils/database/fun';
export class PokeCommand extends Command { export class PokeCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'poke', name: 'poke',

View File

@ -22,7 +22,7 @@ import { EmbedBuilder } from 'discord.js';
import { Sad } from '#utils/gifs'; import { Sad } from '#utils/gifs';
export class SadCommand extends Command { export class SadCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'sad', name: 'sad',

View File

@ -22,7 +22,7 @@ import { EmbedBuilder } from 'discord.js';
import { Shrug } from '#utils/gifs'; import { Shrug } from '#utils/gifs';
export class ShrugCommand extends Command { export class ShrugCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'shrug', name: 'shrug',

View File

@ -26,7 +26,7 @@ import { addEmptyUser, updateUser } from '#utils/database/dbExistingUser';
import { checkTempBan, removeTempBan } from '#utils/database/tempBan'; import { checkTempBan, removeTempBan } from '#utils/database/tempBan';
export class BanCommand extends Command { export class BanCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'ban', name: 'ban',

View File

@ -26,7 +26,7 @@ import { addTempBan, checkTempBan } from '#utils/database/tempBan';
import { addEmptyUser, updateUser } from '#utils/database/dbExistingUser'; import { addEmptyUser, updateUser } from '#utils/database/dbExistingUser';
export class TempBanCommand extends Command { export class TempBanCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'tempban', name: 'tempban',
@ -258,14 +258,14 @@ export class TempBanCommand extends Command {
await addTempBan(userId, modId, time.fromNow, reason); await addTempBan(userId, modId, time.fromNow, reason);
// Create scheduled task to unban // Create scheduled task to unban
this.container.tasks.create( this.container.tasks.create({
'tempBan', name: 'tempBan',
{ payload: {
userId: user.id, userId: user.id,
guildId: guild.id, guildId: guild.id,
}, },
time.offset, delay: time.offset,
); });
info.message = `${user} has been temporarily banned for ${banLength}.`; info.message = `${user} has been temporarily banned for ${banLength}.`;
info.success = true; info.success = true;

View File

@ -33,7 +33,7 @@ import { checkTempBan, removeTempBan } from '#utils/database/tempBan';
import { addEmptyUser, addExistingUser } from '#utils/database/dbExistingUser'; import { addEmptyUser, addExistingUser } from '#utils/database/dbExistingUser';
export class UnbanCommand extends Command { export class UnbanCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'unban', name: 'unban',

View File

@ -31,7 +31,7 @@ import type { TextChannel, Snowflake } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class DiversityCommand extends Subcommand { export class DiversityCommand extends Subcommand {
public constructor(context: Subcommand.Context, options: Subcommand.Options) { public constructor(context: Subcommand.LoaderContext, options: Subcommand.Options) {
super(context, { super(context, {
...options, ...options,
name: 'diversity', name: 'diversity',

View File

@ -25,7 +25,7 @@ import type { Message } from 'discord.js';
import { ChannelType } from 'discord.js'; import { ChannelType } from 'discord.js';
export class MoveAllCommand extends Command { export class MoveAllCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'moveall', name: 'moveall',

View File

@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
import type { GuildMember, Message } from 'discord.js'; import type { GuildMember, Message } from 'discord.js';
export class RenameUserCommand extends Command { export class RenameUserCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'rename', name: 'rename',

View File

@ -277,7 +277,7 @@ export async function restrictRun(
} }
export class RestrictCommand extends Command { export class RestrictCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'restrict', name: 'restrict',

View File

@ -25,7 +25,7 @@ import { getRestrictions } from '#utils/database/restriction';
import { checkStaff } from '#utils/checker'; import { checkStaff } from '#utils/checker';
export class RestrictLogsCommand extends Command { export class RestrictLogsCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'restrictlogs', name: 'restrictlogs',

View File

@ -22,7 +22,7 @@ import type { User, Message } from 'discord.js';
import { restrictRun } from './restrict'; import { restrictRun } from './restrict';
export class RestrictToleranceCommand extends Command { export class RestrictToleranceCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'restricttolerance', name: 'restricttolerance',

View File

@ -24,7 +24,7 @@ import { CategoryChannel, ChannelType } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class RestrictToolsCommand extends Subcommand { export class RestrictToolsCommand extends Subcommand {
public constructor(context: Subcommand.Context, options: Subcommand.Options) { public constructor(context: Subcommand.LoaderContext, options: Subcommand.Options) {
super(context, { super(context, {
...options, ...options,
name: 'restricttools', name: 'restricttools',

View File

@ -29,7 +29,7 @@ import {
} from '#utils/database/restriction'; } from '#utils/database/restriction';
export class UnRestrictCommand extends Command { export class UnRestrictCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'unrestrict', name: 'unrestrict',

View File

@ -24,7 +24,7 @@ import { Duration, DurationFormatter } from '@sapphire/time-utilities';
import { isNumber } from '#utils/maths'; import { isNumber } from '#utils/maths';
export class SlowmodeCommand extends Command { export class SlowmodeCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'slowmode', name: 'slowmode',

View File

@ -22,7 +22,7 @@ import type { GuildMember, Message } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class SoftMuteCommand extends Command { export class SoftMuteCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'softmute', name: 'softmute',

View File

@ -43,7 +43,7 @@ import IDs from '#utils/ids';
// TODO add a check when they join the server to give the user the sus role again // TODO add a check when they join the server to give the user the sus role again
export class SusCommand extends Subcommand { export class SusCommand extends Subcommand {
public constructor(context: Subcommand.Context, options: Subcommand.Options) { public constructor(context: Subcommand.LoaderContext, options: Subcommand.Options) {
super(context, { super(context, {
...options, ...options,
name: 'sus', name: 'sus',

View File

@ -23,7 +23,7 @@ import { addMute, removeMute, checkActive } from '#utils/database/vcMute';
import { addExistingUser } from '#utils/database/dbExistingUser'; import { addExistingUser } from '#utils/database/dbExistingUser';
export class VCMuteCommand extends Command { export class VCMuteCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'vcmute', name: 'vcmute',

View File

@ -28,7 +28,7 @@ import { addWarn } from '#utils/database/warnings';
mean we would have a lot of the warns already in the database. mean we would have a lot of the warns already in the database.
*/ */
export class WarnCommand extends Command { export class WarnCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'warn', name: 'warn',

View File

@ -38,7 +38,7 @@ import IDs from '#utils/ids';
import { EmbedBuilder } from 'discord.js'; import { EmbedBuilder } from 'discord.js';
export class OutreachCommand extends Subcommand { export class OutreachCommand extends Subcommand {
public constructor(context: Subcommand.Context, options: Subcommand.Options) { public constructor(context: Subcommand.LoaderContext, options: Subcommand.Options) {
super(context, { super(context, {
...options, ...options,
name: 'outreach', name: 'outreach',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class BookClubCommand extends Command { export class BookClubCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'bookclub', name: 'bookclub',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class DebateHostCommand extends Command { export class DebateHostCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'debatehost', name: 'debatehost',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class GameNightHostCommand extends Command { export class GameNightHostCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'gamenight', name: 'gamenight',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class GuestCommand extends Command { export class GuestCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'guest', name: 'guest',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class MentorCommand extends Command { export class MentorCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'mentor', name: 'mentor',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class ModCommand extends Command { export class ModCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'mod', name: 'mod',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class RestrictedAccessCommand extends Command { export class RestrictedAccessCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'restrictedaccess', name: 'restrictedaccess',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class StageHostCommand extends Command { export class StageHostCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'stagehost', name: 'stagehost',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class TrialModCommand extends Command { export class TrialModCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'trialmod', name: 'trialmod',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class TrialVerifierCommand extends Command { export class TrialVerifierCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'trialverifier', name: 'trialverifier',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class VerifierCommand extends Command { export class VerifierCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'verifier', name: 'verifier',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class ActivistCommand extends Command { export class ActivistCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'activist', name: 'activist',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class ARAVeganCommand extends Command { export class ARAVeganCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'aravegan', name: 'aravegan',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class ConvincedCommand extends Command { export class ConvincedCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'convinced', name: 'convinced',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class PlusCommand extends Command { export class PlusCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'plus', name: 'plus',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class TrustedCommand extends Command { export class TrustedCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'trusted', name: 'trusted',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class VeganCommand extends Command { export class VeganCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'vegan', name: 'vegan',

View File

@ -23,7 +23,7 @@ import IDs from '#utils/ids';
import { roleAddLog, roleRemoveLog } from '#utils/logging/role'; import { roleAddLog, roleRemoveLog } from '#utils/logging/role';
export class VegCuriousCommand extends Command { export class VegCuriousCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'vegcurious', name: 'vegcurious',

View File

@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
import type { Message } from 'discord.js'; import type { Message } from 'discord.js';
export class ApplyCommand extends Command { export class ApplyCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'apply', name: 'apply',

View File

@ -22,7 +22,7 @@ import type { Message } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class RenameUserCommand extends Command { export class RenameUserCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'count', name: 'count',

View File

@ -19,7 +19,7 @@ import { EmbedBuilder } from 'discord.js';
import type { Message } from 'discord.js'; import type { Message } from 'discord.js';
export class HelpCommand extends Command { export class HelpCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'help', name: 'help',

View File

@ -20,7 +20,7 @@
import { Command, RegisterBehavior } from '@sapphire/framework'; import { Command, RegisterBehavior } from '@sapphire/framework';
export class InfoCommand extends Command { export class InfoCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'info', name: 'info',

View File

@ -22,7 +22,7 @@ import { Command } from '@sapphire/framework';
import type { Message } from 'discord.js'; import type { Message } from 'discord.js';
export class PingCommand extends Command { export class PingCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'ping', name: 'ping',

View File

@ -27,7 +27,7 @@ import {
import { manualVerification } from '#utils/database/verification'; import { manualVerification } from '#utils/database/verification';
export class VerifyCommand extends Command { export class VerifyCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'verify', name: 'verify',

View File

@ -22,7 +22,7 @@ import IDs from '#utils/ids';
import { checkVerificationFinish } from '#utils/database/verification'; import { checkVerificationFinish } from '#utils/database/verification';
export class VerifyTimeoutRemoveCommand extends Command { export class VerifyTimeoutRemoveCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'verifytimeoutremove', name: 'verifytimeoutremove',

View File

@ -23,7 +23,7 @@ import { EmbedBuilder } from 'discord.js';
import { getRank, xpToNextLevel } from '#utils/database/xp'; import { getRank, xpToNextLevel } from '#utils/database/xp';
export class RankCommand extends Command { export class RankCommand extends Command {
public constructor(context: Command.Context, options: Command.Options) { public constructor(context: Command.LoaderContext, options: Command.Options) {
super(context, { super(context, {
...options, ...options,
name: 'rank', name: 'rank',

View File

@ -25,7 +25,7 @@ import IDs from '#utils/ids';
import { addEmptyUser, addExistingUser } from '#utils/database/dbExistingUser'; import { addEmptyUser, addExistingUser } from '#utils/database/dbExistingUser';
export class BanListener extends Listener { export class BanListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'guildBanAdd', event: 'guildBanAdd',

View File

@ -23,7 +23,7 @@ import { checkBan, getBanReason } from '#utils/database/ban';
import { checkTempBan } from '#utils/database/tempBan'; import { checkTempBan } from '#utils/database/tempBan';
export class BanJoinListener extends Listener { export class BanJoinListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'guildMemberAdd', event: 'guildMemberAdd',

View File

@ -25,7 +25,7 @@ import IDs from '#utils/ids';
import { addEmptyUser, addExistingUser } from '#utils/database/dbExistingUser'; import { addEmptyUser, addExistingUser } from '#utils/database/dbExistingUser';
export class UnbanListener extends Listener { export class UnbanListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'guildBanRemove', event: 'guildBanRemove',

View File

@ -21,7 +21,7 @@ import { Listener } from '@sapphire/framework';
import type { Message } from 'discord.js'; import type { Message } from 'discord.js';
export class BotAppreciationListener extends Listener { export class BotAppreciationListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'messageCreate', event: 'messageCreate',

View File

@ -24,7 +24,7 @@ import type {
import { Listener } from '@sapphire/framework'; import { Listener } from '@sapphire/framework';
export class OldCommandDeniedListener extends Listener { export class OldCommandDeniedListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'messageCommandDenied', event: 'messageCommandDenied',

View File

@ -25,7 +25,7 @@ import { getLastCount, addCount } from '#utils/database/counting';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class XpListener extends Listener { export class XpListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'messageCreate', event: 'messageCreate',

View File

@ -27,7 +27,7 @@ import {
} from '#utils/database/dbExistingUser'; } from '#utils/database/dbExistingUser';
export class DbLeaveServerListener extends Listener { export class DbLeaveServerListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'guildMemberRemove', event: 'guildMemberRemove',

View File

@ -24,7 +24,7 @@ import type {
import { Listener } from '@sapphire/framework'; import { Listener } from '@sapphire/framework';
export class CommandDeniedListener extends Listener { export class CommandDeniedListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'chatInputCommandDenied', event: 'chatInputCommandDenied',

View File

@ -24,7 +24,7 @@ import { Listener } from '@sapphire/framework';
import { setupTypes } from '#utils/database/outreach'; import { setupTypes } from '#utils/database/outreach';
export class EventTypesReadyListener extends Listener { export class EventTypesReadyListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
once: true, once: true,

View File

@ -26,7 +26,7 @@ import { checkActive, getRestrictions } from '#utils/database/restriction';
import { findNotes } from '#utils/database/sus'; import { findNotes } from '#utils/database/sus';
export class ModMailCreateListener extends Listener { export class ModMailCreateListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'channelCreate', event: 'channelCreate',

View File

@ -24,7 +24,7 @@ import type { Client, TextChannel } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class NonVeganAccessReady extends Listener { export class NonVeganAccessReady extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
once: true, once: true,

View File

@ -24,7 +24,7 @@ import { Listener } from '@sapphire/framework';
import type { Client } from 'discord.js'; import type { Client } from 'discord.js';
export class ReadyListener extends Listener { export class ReadyListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
once: true, once: true,

View File

@ -33,7 +33,7 @@ import { blockedRoles, blockedRolesAfterRestricted } from '#utils/blockedRoles';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class RolesJoinServerListener extends Listener { export class RolesJoinServerListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'guildMemberAdd', event: 'guildMemberAdd',

View File

@ -23,7 +23,7 @@ import type { Message } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class Suggestions extends Listener { export class Suggestions extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'messageCreate', event: 'messageCreate',

View File

@ -22,7 +22,7 @@ import type { VoiceState } from 'discord.js';
import { checkActive, removeMute } from '#utils/database/vcMute'; import { checkActive, removeMute } from '#utils/database/vcMute';
export class VCMuteListener extends Listener { export class VCMuteListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'voiceStateUpdate', event: 'voiceStateUpdate',

View File

@ -56,7 +56,7 @@ import { rolesToString } from '#utils/formatter';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class VerificationJoinVCListener extends Listener { export class VerificationJoinVCListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'voiceStateUpdate', event: 'voiceStateUpdate',
@ -151,14 +151,15 @@ export class VerificationJoinVCListener extends Listener {
]); ]);
// Start 15-minute timer if verifier does not join // Start 15-minute timer if verifier does not join
this.container.tasks.create( this.container.tasks.create({
'verifyTimeout', name: 'verifyTimeout',
{ payload: {
channelId: channel.id, channelId: channel.id,
userId: member.id, userId: member.id,
}, },
900_000, },
); // 15 minutes 900_000 // 15 minutes
);
} }
// Check how many voice channels there are // Check how many voice channels there are
@ -506,12 +507,13 @@ export class VerificationJoinVCListener extends Listener {
await giveVerificationRoles(user, info.roles); await giveVerificationRoles(user, info.roles);
// Add timeout if they do not have activist role // Add timeout if they do not have activist role
if (!info.roles.activist) { if (!info.roles.activist) {
this.container.tasks.create( this.container.tasks.create({
'verifyUnblock', name: 'verifyUnblock',
{ payload: {
userId: user.id, userId: user.id,
guildId: guild.id, guildId: guild.id,
}, },
},
info.roles.vegan || info.roles.convinced ? 604800000 : 1814400000, info.roles.vegan || info.roles.convinced ? 604800000 : 1814400000,
); );
} }

View File

@ -37,7 +37,7 @@ import { fibonacci } from '#utils/maths';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class VerificationLeaveVCListener extends Listener { export class VerificationLeaveVCListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'voiceStateUpdate', event: 'voiceStateUpdate',
@ -103,13 +103,14 @@ export class VerificationLeaveVCListener extends Listener {
// Creates the length of the time for the ban // Creates the length of the time for the ban
const banLength = fibonacci(incompleteCount) * 3600_000; const banLength = fibonacci(incompleteCount) * 3600_000;
this.container.tasks.create( this.container.tasks.create({
'verifyUnblock', name: 'verifyUnblock',
{ payload: {
userId: user.id, userId: user.id,
guildId: guild.id, guildId: guild.id,
}, },
banLength, },
banLength,
); );
await user.user await user.user

View File

@ -22,7 +22,7 @@ import type { Message } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class VerificationMessageCounter extends Listener { export class VerificationMessageCounter extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'messageCreate', event: 'messageCreate',

View File

@ -29,7 +29,7 @@ import { createVerificationVoice } from '#utils/verification';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class VerificationReady extends Listener { export class VerificationReady extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
once: true, once: true,

View File

@ -24,7 +24,7 @@ import type { Client, TextChannel } from 'discord.js';
import IDs from '#utils/ids'; import IDs from '#utils/ids';
export class VerificationReady extends Listener { export class VerificationReady extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
once: true, once: true,

View File

@ -23,7 +23,7 @@ import { addXp, checkCanAddXp } from '#utils/database/xp';
import { randint } from '#utils/maths'; import { randint } from '#utils/maths';
export class XpListener extends Listener { export class XpListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.LoaderContext, options: Listener.Options) {
super(context, { super(context, {
...options, ...options,
event: 'messageCreate', event: 'messageCreate',

View File

@ -24,7 +24,7 @@ import IDs from '#utils/ids';
export class DiversityMonMessageTask extends ScheduledTask { export class DiversityMonMessageTask extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, { super(context, {

View File

@ -24,7 +24,7 @@ import IDs from '#utils/ids';
export class DiversityWedMessageTask extends ScheduledTask { export class DiversityWedMessageTask extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, { super(context, {

View File

@ -24,7 +24,7 @@ import IDs from '#utils/ids';
export class RestrictedMessageTask extends ScheduledTask { export class RestrictedMessageTask extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, { super(context, {

View File

@ -24,7 +24,7 @@ import IDs from '#utils/ids';
export class StandupTask extends ScheduledTask { export class StandupTask extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, { super(context, {

View File

@ -24,7 +24,7 @@ import IDs from '#utils/ids';
export class VerifyReminder extends ScheduledTask { export class VerifyReminder extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, { super(context, {

View File

@ -25,7 +25,7 @@ import { checkTempBan, removeTempBan } from '#utils/database/tempBan';
export class TempBan extends ScheduledTask { export class TempBan extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, options); super(context, options);
@ -102,6 +102,6 @@ export class TempBan extends ScheduledTask {
declare module '@sapphire/plugin-scheduled-tasks' { declare module '@sapphire/plugin-scheduled-tasks' {
interface ScheduledTasks { interface ScheduledTasks {
tempBan: never; tempBan: { userId: string; guildId: string }
} }
} }

View File

@ -22,7 +22,7 @@ import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
export class VerifyTimeout extends ScheduledTask { export class VerifyTimeout extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, options); super(context, options);
@ -56,6 +56,6 @@ export class VerifyTimeout extends ScheduledTask {
declare module '@sapphire/plugin-scheduled-tasks' { declare module '@sapphire/plugin-scheduled-tasks' {
interface ScheduledTasks { interface ScheduledTasks {
verifyTimeout: never; verifyTimeout: { channelId: string; userId: string };
} }
} }

View File

@ -22,7 +22,7 @@ import IDs from '#utils/ids';
export class VerifyUnblock extends ScheduledTask { export class VerifyUnblock extends ScheduledTask {
public constructor( public constructor(
context: ScheduledTask.Context, context: ScheduledTask.LoaderContext,
options: ScheduledTask.Options, options: ScheduledTask.Options,
) { ) {
super(context, options); super(context, options);
@ -56,6 +56,6 @@ export class VerifyUnblock extends ScheduledTask {
declare module '@sapphire/plugin-scheduled-tasks' { declare module '@sapphire/plugin-scheduled-tasks' {
interface ScheduledTasks { interface ScheduledTasks {
verifyUnblock: never; verifyUnblock: { userId: string; guildId: string };
} }
} }