mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:04:15 +02:00
refactor(arabot): change eslint for export default
This commit is contained in:
parent
879c8bde77
commit
8e7ed8442c
@ -19,6 +19,7 @@
|
||||
],
|
||||
"rules": {
|
||||
"import/no-unresolved": "error",
|
||||
"import/prefer-default-export": "off",
|
||||
"class-methods-use-this": "off"
|
||||
},
|
||||
"settings": {
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { ChannelType, TextChannel, VoiceChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class AccessCommand extends Command {
|
||||
export class AccessCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -234,5 +234,3 @@ class AccessCommand extends Command {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default AccessCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { Message } from 'discord.js';
|
||||
import { ChannelType, TextChannel } from 'discord.js';
|
||||
|
||||
class AnonymousCommand extends Command {
|
||||
export class AnonymousCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -125,5 +125,3 @@ class AnonymousCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default AnonymousCommand;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { Message } from 'discord.js';
|
||||
|
||||
class ClearCommand extends Command {
|
||||
export class ClearCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -103,5 +103,3 @@ class ClearCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default ClearCommand;
|
||||
|
@ -24,7 +24,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { Message } from 'discord.js';
|
||||
import { ChannelType } from 'discord.js';
|
||||
|
||||
class MoveAllCommand extends Command {
|
||||
export class MoveAllCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -178,5 +178,3 @@ class MoveAllCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default MoveAllCommand;
|
||||
|
@ -29,7 +29,7 @@ import {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class PrivateCommand extends Command {
|
||||
export class PrivateCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -300,7 +300,8 @@ class PrivateCommand extends Command {
|
||||
|
||||
return;
|
||||
}
|
||||
const category = guild.channels.cache.get(IDs.categories.private) as CategoryChannel | undefined;
|
||||
const category = guild.channels.cache
|
||||
.get(IDs.categories.private) as CategoryChannel | undefined;
|
||||
|
||||
if (category === undefined) {
|
||||
await interaction.reply({
|
||||
@ -364,7 +365,8 @@ class PrivateCommand extends Command {
|
||||
}
|
||||
|
||||
private checkPrivate(user: Snowflake, coordinator: string, guild: Guild) {
|
||||
const category = guild.channels.cache.get(IDs.categories.private) as CategoryChannel | undefined;
|
||||
const category = guild.channels.cache
|
||||
.get(IDs.categories.private) as CategoryChannel | undefined;
|
||||
|
||||
if (category === undefined) {
|
||||
return true;
|
||||
@ -382,5 +384,3 @@ class PrivateCommand extends Command {
|
||||
return exists;
|
||||
}
|
||||
}
|
||||
|
||||
export default PrivateCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { N1984 } from '#utils/gifs';
|
||||
|
||||
class N1984Command extends Command {
|
||||
export class N1984Command extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -63,5 +63,3 @@ class N1984Command extends Command {
|
||||
await interaction.reply({ embeds: [n1984Embed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default N1984Command;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { Happy } from '#utils/gifs';
|
||||
|
||||
class HappyCommand extends Command {
|
||||
export class HappyCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -61,5 +61,3 @@ class HappyCommand extends Command {
|
||||
await interaction.reply({ embeds: [happyEmbed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default HappyCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { Hugs } from '#utils/gifs';
|
||||
|
||||
class HugCommand extends Command {
|
||||
export class HugCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -64,5 +64,3 @@ class HugCommand extends Command {
|
||||
await interaction.reply({ content: `<@${user.id}>`, embeds: [hugEmbed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default HugCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { Kill } from '#utils/gifs';
|
||||
|
||||
class KillCommand extends Command {
|
||||
export class KillCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -64,5 +64,3 @@ class KillCommand extends Command {
|
||||
await interaction.reply({ content: `<@${user.id}>`, embeds: [killEmbed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default KillCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { Poke } from '#utils/gifs';
|
||||
|
||||
class PokeCommand extends Command {
|
||||
export class PokeCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -65,5 +65,3 @@ class PokeCommand extends Command {
|
||||
await interaction.reply({ content: `<@${user.id}>`, embeds: [pokeEmbed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default PokeCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { Sad } from '#utils/gifs';
|
||||
|
||||
class SadCommand extends Command {
|
||||
export class SadCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -61,5 +61,3 @@ class SadCommand extends Command {
|
||||
await interaction.reply({ embeds: [sadEmbed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default SadCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { Shrug } from '#utils/gifs';
|
||||
|
||||
class ShrugCommand extends Command {
|
||||
export class ShrugCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -61,5 +61,3 @@ class ShrugCommand extends Command {
|
||||
await interaction.reply({ embeds: [shrugEmbed], fetchReply: true });
|
||||
}
|
||||
}
|
||||
|
||||
export default ShrugCommand;
|
||||
|
@ -23,7 +23,7 @@ import IDs from '#utils/ids';
|
||||
import { addBan, checkActive } from '#utils/database/ban';
|
||||
import { addEmptyUser, addExistingUser, userExists } from '#utils/database/dbExistingUser';
|
||||
|
||||
class BanCommand extends Command {
|
||||
export class BanCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -132,10 +132,12 @@ class BanCommand extends Command {
|
||||
await addBan(user.id, mod.user.id, reason);
|
||||
|
||||
// Log the ban
|
||||
let logChannel = guild.channels.cache.get(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
let logChannel = guild.channels.cache
|
||||
.get(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
|
||||
if (logChannel === undefined) {
|
||||
logChannel = await guild.channels.fetch(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
logChannel = await guild.channels
|
||||
.fetch(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
if (logChannel === undefined) {
|
||||
console.error('Ban Error: Could not fetch log channel');
|
||||
return;
|
||||
@ -232,10 +234,12 @@ class BanCommand extends Command {
|
||||
await message.react('✅');
|
||||
|
||||
// Log the ban
|
||||
let logChannel = guild.channels.cache.get(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
let logChannel = guild.channels.cache
|
||||
.get(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
|
||||
if (logChannel === undefined) {
|
||||
logChannel = await guild.channels.fetch(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
logChannel = await guild.channels
|
||||
.fetch(IDs.channels.logs.restricted) as TextChannel | undefined;
|
||||
if (logChannel === undefined) {
|
||||
console.error('Ban Error: Could not fetch log channel');
|
||||
return;
|
||||
@ -245,5 +249,3 @@ class BanCommand extends Command {
|
||||
await logChannel.send(`${user} was banned for: ${reason} by ${mod}`);
|
||||
}
|
||||
}
|
||||
|
||||
export default BanCommand;
|
||||
|
@ -33,7 +33,7 @@ import {
|
||||
import type { TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class DiversityCommand extends Command {
|
||||
export class DiversityCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -136,7 +136,8 @@ class DiversityCommand extends Command {
|
||||
}
|
||||
|
||||
// Checks if the channel is open
|
||||
const open = channel.permissionsFor(IDs.roles.vegan.vegan)!.has([PermissionsBitField.Flags.SendMessages]);
|
||||
const open = channel.permissionsFor(IDs.roles.vegan.vegan)!
|
||||
.has([PermissionsBitField.Flags.SendMessages]);
|
||||
|
||||
// Toggle send message in channel
|
||||
await channelText.permissionOverwrites.edit(IDs.roles.vegan.vegan, { SendMessages: !open });
|
||||
@ -275,5 +276,3 @@ class DiversityCommand extends Command {
|
||||
await thread.members.remove(member);
|
||||
}
|
||||
}
|
||||
|
||||
export default DiversityCommand;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
|
||||
class RenameUserCommand extends Command {
|
||||
export class RenameUserCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -113,5 +113,3 @@ class RenameUserCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default RenameUserCommand;
|
||||
|
@ -41,7 +41,7 @@ import IDs from '#utils/ids';
|
||||
|
||||
// TODO add a check when they join the server to give the user the sus role again
|
||||
|
||||
class SusCommand extends Command {
|
||||
export class SusCommand extends Command {
|
||||
public constructor(context: Command.Context) {
|
||||
super(context, {
|
||||
name: 'sus',
|
||||
@ -535,5 +535,3 @@ class SusCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default SusCommand;
|
||||
|
@ -28,7 +28,7 @@ import IDs from '#utils/ids';
|
||||
import { removeBan, checkActive, addBan } from '#utils/database/ban';
|
||||
import { addEmptyUser, addExistingUser, userExists } from '#utils/database/dbExistingUser';
|
||||
|
||||
class UnbanCommand extends Command {
|
||||
export class UnbanCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -131,10 +131,12 @@ class UnbanCommand extends Command {
|
||||
});
|
||||
|
||||
// Log the ban
|
||||
let modRestrict = guild.channels.cache.get(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
let modRestrict = guild.channels.cache
|
||||
.get(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
|
||||
if (modRestrict === undefined) {
|
||||
modRestrict = await guild.channels.fetch(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
modRestrict = await guild.channels
|
||||
.fetch(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
if (modRestrict === undefined) {
|
||||
console.error('Unban Error: Could not fetch mod channel');
|
||||
return;
|
||||
@ -221,10 +223,12 @@ class UnbanCommand extends Command {
|
||||
});
|
||||
|
||||
// Log the ban
|
||||
let modRestrict = guild.channels.cache.get(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
let modRestrict = guild.channels.cache
|
||||
.get(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
|
||||
if (modRestrict === undefined) {
|
||||
modRestrict = await guild.channels.fetch(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
modRestrict = await guild.channels
|
||||
.fetch(IDs.channels.restricted.moderators) as TextChannel | undefined;
|
||||
if (modRestrict === undefined) {
|
||||
console.error('Unban Error: Could not fetch mod channel');
|
||||
return;
|
||||
@ -234,5 +238,3 @@ class UnbanCommand extends Command {
|
||||
await modRestrict.send(`${user} was unbanned by ${mod}`);
|
||||
}
|
||||
}
|
||||
|
||||
export default UnbanCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class ActivistCommand extends Command {
|
||||
export class ActivistCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -199,5 +199,3 @@ class ActivistCommand extends Command {
|
||||
.catch(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
export default ActivistCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class BookClubCommand extends Command {
|
||||
export class BookClubCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class BookClubCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default BookClubCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class ConvincedCommand extends Command {
|
||||
export class ConvincedCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -183,5 +183,3 @@ class ConvincedCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default ConvincedCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class DebateHostCommand extends Command {
|
||||
export class DebateHostCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class DebateHostCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default DebateHostCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class GameNightHostCommand extends Command {
|
||||
export class GameNightHostCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class GameNightHostCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default GameNightHostCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class GuestCommand extends Command {
|
||||
export class GuestCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class GuestCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default GuestCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class PlusCommand extends Command {
|
||||
export class PlusCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -170,5 +170,3 @@ class PlusCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default PlusCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class MentorCommand extends Command {
|
||||
export class MentorCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class MentorCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default MentorCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class ModCommand extends Command {
|
||||
export class ModCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -153,5 +153,3 @@ class ModCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default ModCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class RestrictedAccessCommand extends Command {
|
||||
export class RestrictedAccessCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class RestrictedAccessCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default RestrictedAccessCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class StageHostCommand extends Command {
|
||||
export class StageHostCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -154,5 +154,3 @@ class StageHostCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default StageHostCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class TrialVerifierCommand extends Command {
|
||||
export class TrialVerifierCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -153,5 +153,3 @@ class TrialVerifierCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default TrialVerifierCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerifierCommand extends Command {
|
||||
export class VerifierCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -161,5 +161,3 @@ class VerifierCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifierCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class TrustedCommand extends Command {
|
||||
export class TrustedCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -160,5 +160,3 @@ class TrustedCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default TrustedCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VeganCommand extends Command {
|
||||
export class VeganCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -203,5 +203,3 @@ class VeganCommand extends Command {
|
||||
.catch(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
export default VeganCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { GuildMember, Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VegCuriousCommand extends Command {
|
||||
export class VegCuriousCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -186,5 +186,3 @@ class VegCuriousCommand extends Command {
|
||||
+ `which gives you access to ${dietSupport}`).catch(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
export default VegCuriousCommand;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { Message } from 'discord.js';
|
||||
|
||||
class ApplyCommand extends Command {
|
||||
export class ApplyCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -57,5 +57,3 @@ class ApplyCommand extends Command {
|
||||
await message.reply(this.message);
|
||||
}
|
||||
}
|
||||
|
||||
export default ApplyCommand;
|
||||
|
@ -21,7 +21,7 @@ import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||
import type { Message } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class RenameUserCommand extends Command {
|
||||
export class RenameUserCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -106,5 +106,3 @@ class RenameUserCommand extends Command {
|
||||
await message.react('✅');
|
||||
}
|
||||
}
|
||||
|
||||
export default RenameUserCommand;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import { isMessageInstance } from '@sapphire/discord.js-utilities';
|
||||
import { Command } from '@sapphire/framework';
|
||||
|
||||
class PingCommand extends Command {
|
||||
export class PingCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -49,5 +49,3 @@ class PingCommand extends Command {
|
||||
return interaction.editReply('Failed to retrieve ping :(');
|
||||
}
|
||||
}
|
||||
|
||||
export default PingCommand;
|
||||
|
@ -21,7 +21,7 @@ import { InteractionHandler, InteractionHandlerTypes, PieceContext } from '@sapp
|
||||
import type { ButtonInteraction, GuildMember, TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class WelcomeButtonHandler extends InteractionHandler {
|
||||
export class WelcomeButtonHandler extends InteractionHandler {
|
||||
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
|
||||
super(ctx, {
|
||||
...options,
|
||||
@ -37,7 +37,8 @@ class WelcomeButtonHandler extends InteractionHandler {
|
||||
|
||||
public async run(interaction: ButtonInteraction) {
|
||||
let { member } = interaction;
|
||||
const general = this.container.client.channels.cache.get(IDs.channels.nonVegan.general) as TextChannel | undefined;
|
||||
const general = this.container.client.channels.cache
|
||||
.get(IDs.channels.nonVegan.general) as TextChannel | undefined;
|
||||
if (general === undefined) {
|
||||
return;
|
||||
}
|
||||
@ -75,5 +76,3 @@ class WelcomeButtonHandler extends InteractionHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default WelcomeButtonHandler;
|
||||
|
@ -21,7 +21,7 @@ import { Listener } from '@sapphire/framework';
|
||||
import type { GuildMember } from 'discord.js';
|
||||
import { checkActive, getReason } from '#utils/database/ban';
|
||||
|
||||
class BanJoin extends Listener {
|
||||
export class BanJoin extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -47,5 +47,3 @@ class BanJoin extends Listener {
|
||||
await user.ban({ reason });
|
||||
}
|
||||
}
|
||||
|
||||
export default BanJoin;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import type { UserError, MessageCommandDeniedPayload } from '@sapphire/framework';
|
||||
import { Listener } from '@sapphire/framework';
|
||||
|
||||
class OldCommandDeniedListener extends Listener {
|
||||
export class OldCommandDeniedListener extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -33,5 +33,3 @@ class OldCommandDeniedListener extends Listener {
|
||||
return message.reply(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
export default OldCommandDeniedListener;
|
||||
|
@ -20,7 +20,7 @@
|
||||
import type { UserError, ChatInputCommandDeniedPayload } from '@sapphire/framework';
|
||||
import { Listener } from '@sapphire/framework';
|
||||
|
||||
class CommandDeniedListener extends Listener {
|
||||
export class CommandDeniedListener extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -32,5 +32,3 @@ class CommandDeniedListener extends Listener {
|
||||
return interaction.reply(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
export default CommandDeniedListener;
|
||||
|
@ -23,7 +23,7 @@
|
||||
import { Listener } from '@sapphire/framework';
|
||||
import type { Client } from 'discord.js';
|
||||
|
||||
class ReadyListener extends Listener {
|
||||
export class ReadyListener extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -37,5 +37,3 @@ class ReadyListener extends Listener {
|
||||
this.container.logger.info(`Successfully logged in as ${username} (${id})`);
|
||||
}
|
||||
}
|
||||
|
||||
export default ReadyListener;
|
||||
|
@ -23,7 +23,7 @@ import type { GuildMember } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
import { blockTime } from '#utils/database/verification';
|
||||
|
||||
class VerificationReady extends Listener {
|
||||
export class VerificationReady extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -48,5 +48,3 @@ class VerificationReady extends Listener {
|
||||
await user.roles.add(roles);
|
||||
}
|
||||
}
|
||||
|
||||
export default VerificationReady;
|
||||
|
@ -45,7 +45,7 @@ import { userExists, addExistingUser } from '#utils/database/dbExistingUser';
|
||||
import { rolesToString } from '#utils/formatter';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerificationJoinVCListener extends Listener {
|
||||
export class VerificationJoinVCListener extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -136,7 +136,8 @@ class VerificationJoinVCListener extends Listener {
|
||||
}
|
||||
|
||||
// Check how many voice channels there are
|
||||
const listVoiceChannels = category.children.cache.filter((c) => c.type === ChannelType.GuildVoice);
|
||||
const listVoiceChannels = category.children.cache
|
||||
.filter((c) => c.type === ChannelType.GuildVoice);
|
||||
|
||||
// Create a text channel for verifiers only
|
||||
// Checks if there are more than 10 voice channels
|
||||
@ -742,7 +743,8 @@ class VerificationJoinVCListener extends Listener {
|
||||
|
||||
// Not vegan
|
||||
if (!roles.vegan) {
|
||||
const general = this.container.client.channels.cache.get(IDs.channels.nonVegan.general) as TextChannel | undefined;
|
||||
const general = this.container.client.channels.cache
|
||||
.get(IDs.channels.nonVegan.general) as TextChannel | undefined;
|
||||
if (general === undefined) {
|
||||
return;
|
||||
}
|
||||
@ -757,7 +759,8 @@ class VerificationJoinVCListener extends Listener {
|
||||
}
|
||||
|
||||
// Vegan
|
||||
const general = this.container.client.channels.cache.get(IDs.channels.vegan.general) as TextChannel | undefined;
|
||||
const general = this.container.client.channels.cache
|
||||
.get(IDs.channels.vegan.general) as TextChannel | undefined;
|
||||
if (general === undefined) {
|
||||
return;
|
||||
}
|
||||
@ -766,7 +769,8 @@ class VerificationJoinVCListener extends Listener {
|
||||
|
||||
// Activist role
|
||||
if (roles.activist) {
|
||||
const activist = this.container.client.channels.cache.get(IDs.channels.activism.activism) as TextChannel | undefined;
|
||||
const activist = this.container.client.channels.cache
|
||||
.get(IDs.channels.activism.activism) as TextChannel | undefined;
|
||||
if (activist === undefined) {
|
||||
return;
|
||||
}
|
||||
@ -808,5 +812,3 @@ class VerificationJoinVCListener extends Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default VerificationJoinVCListener;
|
||||
|
@ -28,7 +28,7 @@ import { fetchRoles } from '#utils/database/dbExistingUser';
|
||||
import { fibonacci } from '#utils/mathsSeries';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerificationLeaveVCListener extends Listener {
|
||||
export class VerificationLeaveVCListener extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -101,7 +101,8 @@ class VerificationLeaveVCListener extends Listener {
|
||||
}
|
||||
|
||||
// Check how many voice channels there are
|
||||
const listVoiceChannels = category.children.cache.filter((c) => c.type === ChannelType.GuildVoice);
|
||||
const listVoiceChannels = category.children.cache
|
||||
.filter((c) => c.type === ChannelType.GuildVoice);
|
||||
|
||||
// Check that it is not deleting the 'Verification' channel (in case bot crashes)
|
||||
if (channel.name !== 'Verification') {
|
||||
@ -112,7 +113,8 @@ class VerificationLeaveVCListener extends Listener {
|
||||
// Delete text channel
|
||||
if (!verifier) {
|
||||
// Gets a list of all the text channels in the verification category
|
||||
const listTextChannels = category.children.cache.filter((c) => c.type === ChannelType.GuildText);
|
||||
const listTextChannels = category.children.cache
|
||||
.filter((c) => c.type === ChannelType.GuildText);
|
||||
listTextChannels.forEach((c) => {
|
||||
const textChannel = c as TextChannel;
|
||||
// Checks if the channel topic has the user's snowflake
|
||||
@ -193,5 +195,3 @@ class VerificationLeaveVCListener extends Listener {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default VerificationLeaveVCListener;
|
||||
|
@ -27,7 +27,7 @@ import type {
|
||||
import { ChannelType, PermissionsBitField } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerificationReady extends Listener {
|
||||
export class VerificationReady extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -38,9 +38,11 @@ class VerificationReady extends Listener {
|
||||
|
||||
public async run(client: Client) {
|
||||
// Get verification category
|
||||
let category = client.channels.cache.get(IDs.categories.verification) as CategoryChannel | undefined;
|
||||
let category = client.channels.cache
|
||||
.get(IDs.categories.verification) as CategoryChannel | undefined;
|
||||
if (category === undefined) {
|
||||
category = await client.channels.fetch(IDs.categories.verification) as CategoryChannel | undefined;
|
||||
category = await client.channels
|
||||
.fetch(IDs.categories.verification) as CategoryChannel | undefined;
|
||||
if (category === undefined) {
|
||||
console.error('verifyStart: Channel not found');
|
||||
return;
|
||||
@ -131,5 +133,3 @@ class VerificationReady extends Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default VerificationReady;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerificationReady extends Listener {
|
||||
export class VerificationReady extends Listener {
|
||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -78,5 +78,3 @@ class VerificationReady extends Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default VerificationReady;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class CoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class CoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
CoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default CoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class DevCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class DevCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkDevCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
DevCoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default DevCoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class DiversityCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class DiversityCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkDiversityCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
DiversityCoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default DiversityCoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class EventCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class EventCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkEventCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
EventCoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default EventCoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class MentorCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class MentorCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkMentorCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
MentorCoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default MentorCoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class MentorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class MentorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkMentor(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
MentorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default MentorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class ModCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class ModCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkModCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
ModCoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default ModCoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class ModOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class ModOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkMod(message.member!);
|
||||
@ -55,5 +55,3 @@ declare module '@sapphire/framework' {
|
||||
ModOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default ModOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class PatreonOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class PatreonOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkPatreon(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
PatreonOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default PatreonOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class RestrictedAccessOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class RestrictedAccessOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkRestrictedAccess(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
RestrictedAccessOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default RestrictedAccessOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerifierCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class VerifierCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkVerifierCoordinator(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
VerifierCoordinatorOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifierCoordinatorOnlyPrecondition;
|
||||
|
@ -26,7 +26,7 @@ import type {
|
||||
} from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerifierOnlyPrecondition extends AllFlowsPrecondition {
|
||||
export class VerifierOnlyPrecondition extends AllFlowsPrecondition {
|
||||
public override async messageRun(message: Message) {
|
||||
// for message command
|
||||
return this.checkVerifier(message.member!);
|
||||
@ -54,5 +54,3 @@ declare module '@sapphire/framework' {
|
||||
VerifierOnly: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifierOnlyPrecondition;
|
||||
|
@ -22,7 +22,7 @@ import { container } from '@sapphire/framework';
|
||||
import type { TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class DiversityMonMessageTask extends ScheduledTask {
|
||||
export class DiversityMonMessageTask extends ScheduledTask {
|
||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -56,5 +56,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
cron: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default DiversityMonMessageTask;
|
||||
|
@ -22,7 +22,7 @@ import { container } from '@sapphire/framework';
|
||||
import type { TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class DiversityWedMessageTask extends ScheduledTask {
|
||||
export class DiversityWedMessageTask extends ScheduledTask {
|
||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -44,7 +44,8 @@ class DiversityWedMessageTask extends ScheduledTask {
|
||||
+ '🧡 Actively seek to include others, especially moderators, in heated discourse for the purpose of de-escalation.';
|
||||
|
||||
const women = client.channels.cache.get(IDs.channels.diversity.women) as TextChannel;
|
||||
const disabilities = client.channels.cache.get(IDs.channels.diversity.disabilities) as TextChannel;
|
||||
const disabilities = client.channels.cache
|
||||
.get(IDs.channels.diversity.disabilities) as TextChannel;
|
||||
|
||||
await women.send(message);
|
||||
await disabilities.send(message);
|
||||
@ -56,5 +57,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
cron: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default DiversityWedMessageTask;
|
||||
|
@ -22,7 +22,7 @@ import { container } from '@sapphire/framework';
|
||||
import type { TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class RestrictedMessageTask extends ScheduledTask {
|
||||
export class RestrictedMessageTask extends ScheduledTask {
|
||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -52,5 +52,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
cron: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default RestrictedMessageTask;
|
||||
|
@ -22,7 +22,7 @@ import { container } from '@sapphire/framework';
|
||||
import type { TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class StandupTask extends ScheduledTask {
|
||||
export class StandupTask extends ScheduledTask {
|
||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -45,5 +45,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
cron: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default StandupTask;
|
||||
|
@ -22,7 +22,7 @@ import { container } from '@sapphire/framework';
|
||||
import type { TextChannel } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
|
||||
class VerifyReminder extends ScheduledTask {
|
||||
export class VerifyReminder extends ScheduledTask {
|
||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||
super(context, {
|
||||
...options,
|
||||
@ -46,5 +46,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
cron: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifyReminder;
|
||||
|
@ -27,9 +27,11 @@ export class VerifyTimeout extends ScheduledTask {
|
||||
|
||||
public async run(payload: { channelId: string, userId: string }) {
|
||||
// Get the guild where the user is in
|
||||
let channel = this.container.client.channels.cache.get(payload.channelId) as VoiceChannel | undefined;
|
||||
let channel = this.container.client.channels.cache
|
||||
.get(payload.channelId) as VoiceChannel | undefined;
|
||||
if (channel === undefined) {
|
||||
channel = await this.container.client.channels.fetch(payload.channelId) as VoiceChannel | undefined;
|
||||
channel = await this.container.client.channels
|
||||
.fetch(payload.channelId) as VoiceChannel | undefined;
|
||||
if (channel === undefined) {
|
||||
console.error('verifyTimeout: Channel not found!');
|
||||
return;
|
||||
@ -52,5 +54,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
verifyUnblock: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifyTimeout;
|
||||
|
@ -56,5 +56,3 @@ declare module '@sapphire/plugin-scheduled-tasks' {
|
||||
verifyUnblock: never;
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifyUnblock;
|
||||
|
Loading…
x
Reference in New Issue
Block a user