mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:04:15 +02:00
refactor(arabot): updated deprecated commands
This commit is contained in:
parent
3f82f87317
commit
bb6ac8aef0
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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;
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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,
|
||||||
|
@ -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',
|
||||||
|
@ -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,
|
||||||
|
@ -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,
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
@ -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,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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',
|
||||||
|
@ -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,
|
||||||
|
@ -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,
|
||||||
|
@ -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',
|
||||||
|
@ -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, {
|
||||||
|
@ -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, {
|
||||||
|
@ -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, {
|
||||||
|
@ -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, {
|
||||||
|
@ -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, {
|
||||||
|
@ -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 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user