1- import { add , check , remove } from "database/blocklist" ;
21import { getLevel , setLevel } from "database/leveling" ;
32import { getSetting } from "database/settings" ;
43import { EmbedBuilder , type TextChannel } from "discord.js" ;
@@ -8,56 +7,14 @@ import { channelCheck } from "utils/channelCheck";
87import { genColor } from "utils/colorGen" ;
98import { dotCheck } from "utils/dotCheck" ;
109import { kominator } from "utils/kominator" ;
11- import { leavePlease } from "utils/leavePlease" ;
1210import { mention } from "utils/mention" ;
1311import { Event } from "utils/types" ;
1412
1513const cooldowns = new Map < string , number > ( ) ;
1614export default ( async function run ( message ) {
1715 const client = message . client ;
18- if ( message . content . startsWith ( "!SYSTEM" ) ) {
19- if ( message . author . id != process . env . OWNER ) return ;
20- const args = message . content . split ( " " ) ;
21- if ( ! args [ 2 ] ) return message . reply ( "ERROR: Expected three arguments." ) ;
22- const username = ( await client . users . fetch ( args [ 2 ] ) ) . username ;
23-
24- switch ( args [ 1 ] ) {
25- case "add" : {
26- add ( args [ 2 ] ) ;
27- await message . reply ( `${ username } has been blocklisted from Sokora.` ) ;
28-
29- const guilds = client . guilds . cache ;
30- for ( const id of guilds . keys ( ) ) {
31- const guild = guilds . get ( id ) ;
32- if ( ! guild ) {
33- await errorEmbed ( {
34- client,
35- title : "Failed to blocklist guild." ,
36- reason : `Guild ${ id } not found` ,
37- } ) ;
38- continue ;
39- }
40- await leavePlease ( guild , await guild . fetchOwner ( ) , "No." ) ;
41- }
42- break ;
43- }
44- case "remove" :
45- remove ( args [ 2 ] ) ;
46- await message . reply ( `${ username } has been removed from the Sokora blocklist.` ) ;
47- break ;
48- case "check" :
49- await message . reply ( `${ ! check ( args [ 2 ] ) } ` ) ;
50- break ;
51- default :
52- await message . reply (
53- "Hello, this is the system interface to control top level Sokora moderation utilities." ,
54- ) ;
55- }
56- }
57-
5816 const author = message . author ;
5917 if ( author . bot ) return ;
60- if ( ! check ( author . id ) ) return ;
6118 const guild = message . guild ! ;
6219 const avatar = author . displayAvatarURL ( ) ;
6320
0 commit comments