mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:04:15 +02:00
refactor(arabot): use absolute paths
This commit is contained in:
parent
45c19824c5
commit
937e874d66
@ -14,9 +14,24 @@
|
|||||||
"project": "tsconfig.json"
|
"project": "tsconfig.json"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@typescript-eslint"
|
"@typescript-eslint",
|
||||||
|
"import"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"import/no-unresolved": "error",
|
||||||
"class-methods-use-this": "off"
|
"class-methods-use-this": "off"
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"import/parsers": {
|
||||||
|
"@typescript-eslint/parser": [
|
||||||
|
".ts",
|
||||||
|
".tsx"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"import/resolver": {
|
||||||
|
"typescript": {
|
||||||
|
"alwaysTryTypes": true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
925
package-lock.json
generated
925
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,9 @@
|
|||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"start:migrate": "prisma migrate deploy && npm run start"
|
"start:migrate": "prisma migrate deploy && npm run start"
|
||||||
},
|
},
|
||||||
|
"imports": {
|
||||||
|
"#utils/*": "./dist/utils/*.js"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/veganhacktivists/arabot.git"
|
"url": "git+https://github.com/veganhacktivists/arabot.git"
|
||||||
@ -48,7 +51,8 @@
|
|||||||
"eslint": "8.22.0",
|
"eslint": "8.22.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-import-resolver-typescript": "^3.5.3",
|
||||||
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"prisma": "^4.4.0"
|
"prisma": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { ChannelType, TextChannel, VoiceChannel } from 'discord.js';
|
import { ChannelType, TextChannel, VoiceChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class AccessCommand extends Command {
|
class AccessCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -27,7 +27,7 @@ import {
|
|||||||
PermissionsBitField, Snowflake,
|
PermissionsBitField, Snowflake,
|
||||||
time,
|
time,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class PrivateCommand extends Command {
|
class PrivateCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { N1984 } from '@utils/gifs';
|
import { N1984 } from '#utils/gifs';
|
||||||
|
|
||||||
class N1984Command extends Command {
|
class N1984Command extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { Happy } from '@utils/gifs';
|
import { Happy } from '#utils/gifs';
|
||||||
|
|
||||||
class HappyCommand extends Command {
|
class HappyCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { Hugs } from '@utils/gifs';
|
import { Hugs } from '#utils/gifs';
|
||||||
|
|
||||||
class HugCommand extends Command {
|
class HugCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { Kill } from '@utils/gifs';
|
import { Kill } from '#utils/gifs';
|
||||||
|
|
||||||
class KillCommand extends Command {
|
class KillCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { Poke } from '@utils/gifs';
|
import { Poke } from '#utils/gifs';
|
||||||
|
|
||||||
class PokeCommand extends Command {
|
class PokeCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { Sad } from '@utils/gifs';
|
import { Sad } from '#utils/gifs';
|
||||||
|
|
||||||
class SadCommand extends Command {
|
class SadCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import { EmbedBuilder } from 'discord.js';
|
import { EmbedBuilder } from 'discord.js';
|
||||||
import { Shrug } from '@utils/gifs';
|
import { Shrug } from '#utils/gifs';
|
||||||
|
|
||||||
class ShrugCommand extends Command {
|
class ShrugCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { User, Message, TextChannel } from 'discord.js';
|
import type { User, Message, TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
import { addBan, checkActive } from '@utils/database/ban';
|
import { addBan, checkActive } from '#utils/database/ban';
|
||||||
import { addEmptyUser, addExistingUser, userExists } from '@utils/database/dbExistingUser';
|
import { addEmptyUser, addExistingUser, userExists } from '#utils/database/dbExistingUser';
|
||||||
|
|
||||||
class BanCommand extends Command {
|
class BanCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -31,7 +31,7 @@ import {
|
|||||||
Snowflake,
|
Snowflake,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class DiversityCommand extends Command {
|
class DiversityCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -28,16 +28,16 @@ import {
|
|||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import type { Message, GuildMember, TextChannel } from 'discord.js';
|
import type { Message, GuildMember, TextChannel } from 'discord.js';
|
||||||
import { isMessageInstance } from '@sapphire/discord.js-utilities';
|
import { isMessageInstance } from '@sapphire/discord.js-utilities';
|
||||||
import { addExistingUser, userExists } from '@utils/database/dbExistingUser';
|
import { addExistingUser, userExists } from '#utils/database/dbExistingUser';
|
||||||
import {
|
import {
|
||||||
addToDatabase,
|
addToDatabase,
|
||||||
findNotes,
|
findNotes,
|
||||||
getNote,
|
getNote,
|
||||||
deactivateNote,
|
deactivateNote,
|
||||||
deactivateAllNotes,
|
deactivateAllNotes,
|
||||||
} from '@utils/database/sus';
|
} from '#utils/database/sus';
|
||||||
import { checkStaff } from '@utils/checker';
|
import { checkStaff } from '#utils/checker';
|
||||||
import IDs from '@utils/ids';
|
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
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ import type {
|
|||||||
TextChannel,
|
TextChannel,
|
||||||
GuildBan,
|
GuildBan,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
import { removeBan, checkActive, addBan } from '@utils/database/ban';
|
import { removeBan, checkActive, addBan } from '#utils/database/ban';
|
||||||
import { addEmptyUser, addExistingUser, userExists } from '@utils/database/dbExistingUser';
|
import { addEmptyUser, addExistingUser, userExists } from '#utils/database/dbExistingUser';
|
||||||
|
|
||||||
class UnbanCommand extends Command {
|
class UnbanCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class ActivistCommand extends Command {
|
class ActivistCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class BookClubCommand extends Command {
|
class BookClubCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class ConvincedCommand extends Command {
|
class ConvincedCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class DebateHostCommand extends Command {
|
class DebateHostCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class GameNightHostCommand extends Command {
|
class GameNightHostCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class GuestCommand extends Command {
|
class GuestCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class PlusCommand extends Command {
|
class PlusCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class MentorCommand extends Command {
|
class MentorCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class ModCommand extends Command {
|
class ModCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class RestrictedAccessCommand extends Command {
|
class RestrictedAccessCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class StageHostCommand extends Command {
|
class StageHostCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class TrialVerifierCommand extends Command {
|
class TrialVerifierCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerifierCommand extends Command {
|
class VerifierCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class TrustedCommand extends Command {
|
class TrustedCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VeganCommand extends Command {
|
class VeganCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
import { Args, Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { GuildMember, Message } from 'discord.js';
|
import type { GuildMember, Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VegCuriousCommand extends Command {
|
class VegCuriousCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Command, RegisterBehavior } from '@sapphire/framework';
|
import { Command, RegisterBehavior } from '@sapphire/framework';
|
||||||
import type { Message } from 'discord.js';
|
import type { Message } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class RenameUserCommand extends Command {
|
class RenameUserCommand extends Command {
|
||||||
public constructor(context: Command.Context, options: Command.Options) {
|
public constructor(context: Command.Context, options: Command.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { InteractionHandler, InteractionHandlerTypes, PieceContext } from '@sapphire/framework';
|
import { InteractionHandler, InteractionHandlerTypes, PieceContext } from '@sapphire/framework';
|
||||||
import type { ButtonInteraction, GuildMember, TextChannel } from 'discord.js';
|
import type { ButtonInteraction, GuildMember, TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class WelcomeButtonHandler extends InteractionHandler {
|
class WelcomeButtonHandler extends InteractionHandler {
|
||||||
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
|
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import { Listener } from '@sapphire/framework';
|
import { Listener } from '@sapphire/framework';
|
||||||
import type { GuildMember } from 'discord.js';
|
import type { GuildMember } from 'discord.js';
|
||||||
import { checkActive, getReason } from '@utils/database/ban';
|
import { checkActive, getReason } from '#utils/database/ban';
|
||||||
|
|
||||||
class BanJoin extends Listener {
|
class BanJoin extends Listener {
|
||||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
import { Listener } from '@sapphire/framework';
|
import { Listener } from '@sapphire/framework';
|
||||||
import type { GuildMember } from 'discord.js';
|
import type { GuildMember } from 'discord.js';
|
||||||
// import { fetchRoles } from '../../utils/database/dbExistingUser';
|
// import { fetchRoles } from '../../utils/database/dbExistingUser';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
import { blockTime } from '@utils/database/verification';
|
import { blockTime } from '#utils/database/verification';
|
||||||
|
|
||||||
class VerificationReady extends Listener {
|
class VerificationReady extends Listener {
|
||||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||||
|
@ -38,12 +38,12 @@ import {
|
|||||||
ActionRowBuilder,
|
ActionRowBuilder,
|
||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { maxVCs, questionInfo, serverFind } from '@utils/verificationConfig';
|
import { maxVCs, questionInfo, serverFind } from '#utils/verificationConfig';
|
||||||
import { joinVerification, startVerification, finishVerification } from '@utils/database/verification';
|
import { joinVerification, startVerification, finishVerification } from '#utils/database/verification';
|
||||||
import { findNotes } from '@utils/database/sus';
|
import { findNotes } from '#utils/database/sus';
|
||||||
import { userExists, addExistingUser } from '@utils/database/dbExistingUser';
|
import { userExists, addExistingUser } from '#utils/database/dbExistingUser';
|
||||||
import { rolesToString } from '@utils/formatter';
|
import { rolesToString } from '#utils/formatter';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerificationJoinVCListener extends Listener {
|
class VerificationJoinVCListener extends Listener {
|
||||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||||
|
@ -22,11 +22,11 @@ import type {
|
|||||||
VoiceState, CategoryChannel, VoiceChannel, TextChannel,
|
VoiceState, CategoryChannel, VoiceChannel, TextChannel,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { time, ChannelType, PermissionsBitField } from 'discord.js';
|
import { time, ChannelType, PermissionsBitField } from 'discord.js';
|
||||||
import { maxVCs, leaveBan } from '@utils/verificationConfig';
|
import { maxVCs, leaveBan } from '#utils/verificationConfig';
|
||||||
import { getUser, checkFinish, countIncomplete } from '@utils/database/verification';
|
import { getUser, checkFinish, countIncomplete } from '#utils/database/verification';
|
||||||
import { fetchRoles } from '@utils/database/dbExistingUser';
|
import { fetchRoles } from '#utils/database/dbExistingUser';
|
||||||
import { fibonacci } from '@utils/mathsSeries';
|
import { fibonacci } from '#utils/mathsSeries';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerificationLeaveVCListener extends Listener {
|
class VerificationLeaveVCListener extends Listener {
|
||||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||||
|
@ -25,7 +25,7 @@ import type {
|
|||||||
VoiceChannel,
|
VoiceChannel,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { ChannelType, PermissionsBitField } from 'discord.js';
|
import { ChannelType, PermissionsBitField } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerificationReady extends Listener {
|
class VerificationReady extends Listener {
|
||||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Client,
|
Client,
|
||||||
TextChannel,
|
TextChannel,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerificationReady extends Listener {
|
class VerificationReady extends Listener {
|
||||||
public constructor(context: Listener.Context, options: Listener.Options) {
|
public constructor(context: Listener.Context, options: Listener.Options) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class CoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class CoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class DevCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class DevCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class DiversityCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class DiversityCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class EventCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class EventCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class MentorCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class MentorCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class MentorOnlyPrecondition extends AllFlowsPrecondition {
|
class MentorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class ModCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class ModCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class ModOnlyPrecondition extends AllFlowsPrecondition {
|
class ModOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class PatreonOnlyPrecondition extends AllFlowsPrecondition {
|
class PatreonOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class RestrictedAccessOnlyPrecondition extends AllFlowsPrecondition {
|
class RestrictedAccessOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerifierCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
class VerifierCoordinatorOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -24,7 +24,7 @@ import type {
|
|||||||
Message,
|
Message,
|
||||||
GuildMember,
|
GuildMember,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerifierOnlyPrecondition extends AllFlowsPrecondition {
|
class VerifierOnlyPrecondition extends AllFlowsPrecondition {
|
||||||
public override async messageRun(message: Message) {
|
public override async messageRun(message: Message) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
||||||
import { container } from '@sapphire/framework';
|
import { container } from '@sapphire/framework';
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class DiversityMonMessageTask extends ScheduledTask {
|
class DiversityMonMessageTask extends ScheduledTask {
|
||||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
||||||
import { container } from '@sapphire/framework';
|
import { container } from '@sapphire/framework';
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class DiversityWedMessageTask extends ScheduledTask {
|
class DiversityWedMessageTask extends ScheduledTask {
|
||||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
||||||
import { container } from '@sapphire/framework';
|
import { container } from '@sapphire/framework';
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class RestrictedMessageTask extends ScheduledTask {
|
class RestrictedMessageTask extends ScheduledTask {
|
||||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
||||||
import { container } from '@sapphire/framework';
|
import { container } from '@sapphire/framework';
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class StandupTask extends ScheduledTask {
|
class StandupTask extends ScheduledTask {
|
||||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
||||||
import { container } from '@sapphire/framework';
|
import { container } from '@sapphire/framework';
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
class VerifyReminder extends ScheduledTask {
|
class VerifyReminder extends ScheduledTask {
|
||||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
export class VerifyUnblock extends ScheduledTask {
|
export class VerifyUnblock extends ScheduledTask {
|
||||||
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
public constructor(context: ScheduledTask.Context, options: ScheduledTask.Options) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { TextChannel } from 'discord.js';
|
import type { TextChannel } from 'discord.js';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the channel is in the staff category.
|
* Checks if the channel is in the staff category.
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import type { GuildMember, GuildMemberRoleManager } from 'discord.js';
|
import type { GuildMember, GuildMemberRoleManager } from 'discord.js';
|
||||||
import { PrismaClient } from '@prisma/client';
|
import { PrismaClient } from '@prisma/client';
|
||||||
import IDs from '@utils/ids';
|
import IDs from '#utils/ids';
|
||||||
|
|
||||||
// Checks if the user exists on the database
|
// Checks if the user exists on the database
|
||||||
export async function userExists(userId: string) {
|
export async function userExists(userId: string) {
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
import type { GuildMember } from 'discord.js';
|
import type { GuildMember } from 'discord.js';
|
||||||
import { PrismaClient } from '@prisma/client';
|
import { PrismaClient } from '@prisma/client';
|
||||||
import { updateUser } from '@utils/database/dbExistingUser';
|
import { updateUser } from '#utils/database/dbExistingUser';
|
||||||
import { leaveBan } from '@utils/verificationConfig';
|
import { leaveBan } from '#utils/verificationConfig';
|
||||||
import { fibonacci } from '@utils/mathsSeries';
|
import { fibonacci } from '#utils/mathsSeries';
|
||||||
|
|
||||||
export async function joinVerification(channelId: string, user: GuildMember) {
|
export async function joinVerification(channelId: string, user: GuildMember) {
|
||||||
// Update the user on the database with the current roles they have
|
// Update the user on the database with the current roles they have
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import devIDs from '@utils/devIDs';
|
import devIDs from '#utils/devIDs';
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-mutable-exports
|
// eslint-disable-next-line import/no-mutable-exports
|
||||||
let IDs = {
|
let IDs = {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||||
"baseUrl": "src", /* Specify the base directory to resolve non-relative module names. */
|
"baseUrl": "src", /* Specify the base directory to resolve non-relative module names. */
|
||||||
"paths": {
|
"paths": {
|
||||||
"@utils/*": ["./utils/*"]
|
"#utils/*": ["./utils/*"]
|
||||||
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||||
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user