diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/assets/Roboto-Regular.ttf | bin | 168260 -> 0 bytes | |||
-rw-r--r-- | src/lib/badlinks.json | 372 | ||||
-rw-r--r-- | src/lib/badwords.json | 20 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushCommandHandler.ts | 68 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushSlashMessage.ts | 5 |
5 files changed, 8 insertions, 457 deletions
diff --git a/src/lib/assets/Roboto-Regular.ttf b/src/lib/assets/Roboto-Regular.ttf Binary files differdeleted file mode 100644 index 3d6861b..0000000 --- a/src/lib/assets/Roboto-Regular.ttf +++ /dev/null diff --git a/src/lib/badlinks.json b/src/lib/badlinks.json deleted file mode 100644 index 39212b5..0000000 --- a/src/lib/badlinks.json +++ /dev/null @@ -1,372 +0,0 @@ -[ - "acercup.com", - "affix-cup.ru", - "affix-sport.ru", - "airdrops.tips", - "aladdinhub.fun", - "allskinz.xyz", - "ano-skinspin.xyz", - "anomalygiveaways.pro", - "anomalyknifes.xyz", - "anomalyskin.xyz", - "anomalyskinz.xyz", - "anoskinzz.xyz", - "berrygamble.com", - "bit-skins.ru", - "bitknife.xyz", - "bitskines.ru", - "casefire.fun", - "challengeme.in", - "challengeme.vip", - "challengme.ru", - "cloud9team.space", - "cmepure.com", - "cmskillcup.com", - "counterpaid.xyz", - "counterspin.top", - "counterstrikegift.xyz", - "cs-beast.xyz", - "cs-lucky.xyz", - "cs-pill.xyz", - "cs-prizeskins.xyz", - "cs-prizeskinz.xyz", - "cs-simpleroll.xyz", - "cs-skinz.xyz", - "cs-smoke.xyz", - "cs-spinz.xyz", - "cs-victory.xyz", - "csallskin.xyz", - "csbuyskins.in", - "cscoat.eu", - "csgo-analyst.com", - "csgo-cash.eu", - "csgo-gifts.com", - "csgo-market.ru.com", - "csgo-market.ru.com", - "csgo-steamanalyst.net", - "csgo-swapskin.com", - "csgo-trade.net", - "csgo-up.com", - "csgobeats.com", - "csgobelieve.ru", - "csgocase.one", - "csgocashs.com", - "csgocheck.ru.com", - "csgocheck.ru", - "csgocompetive.com", - "csgocupp.ru.com", - "csgocybersport.ru.com", - "csgodetails.info", - "csgodreamer.com", - "csgodrs.com", - "csgoeasywin.ru.com", - "csgoelite.xyz", - "csgoencup.com", - "csgoevent.xyz", - "csgogift49.xyz", - "csgoindex.ru.com", - "csgoindex.ru", - "csgoitemdetails.com", - "csgoitemsprices.com", - "csgoko.tk", - "csgomarble.xyz", - "csgomarketplace.net", - "csgomarkets.net", - "csgoorun.ru", - "csgoprocupgo.com", - "csgorcup.com", - "csgorose.com", - "csgoroyalskins1.com", - "csgoskill.ru", - "csgoskinprices.com", - "csgoskinsinfo.com", - "csgoskinsroll.com", - "csgosteamanalysis.com", - "csgosteamanalyst.ru", - "csgoteammate.gq", - "csgothunby.com", - "csgotrades.net", - "csgovip.ru", - "csgoxgiveaway.ru", - "csgozone.net.in", - "csgunskins.xyz", - "csmoneyskinz.xyz", - "csmvcecup.com", - "csprices.in", - "csskill.com", - "csskillpro.xyz", - "csskinz.xyz", - "cstournament.ru", - "csxrnoney.com", - "cybergamearena.ru", - "d2cups.com", - "d2faceit.com", - "deamonbets.ru", - "demonbets.ru", - "denforapasi.cf", - "diablobets.com", - "dicsord.gifts", - "discod.gift", - "discord-gifts.com", - "discord-nitro.gifts", - "discord.blog", - "discord.shop", - "discordgivenitro.com", - "discrod.gift", - "disrcod.com", - "dlscord.info", - "dlscord.online", - "dlscord.press", - "dlscord.store", - "dlscord.world", - "discrod.gifts", - "dlscord.wiki", - "dirscod.gift", - "dirscod.com", - "discorcl.link", - "discod.info", - "dicsord.net", - "discorb.co", - "dicsord.net", - "dicksod.co", - "diskord.ru.com", - "discord-nitro.link", - "discorb.ru.com", - "discordnitrogift.ru", - "discorcl.click", - "doatgiveaway.top", - "dopeskins.com", - "dota2fight.net", - "dota2fight.ru", - "dota2giveaway.top", - "dota2giveaways.top", - "dotafights.vip", - "dotagiveaway.win", - "dragon-up.online", - "earnskinz.xyz", - "emeraldbets.ru", - "eplcups.com", - "esea-mdl.com", - "esportgaming.ru", - "event-games4roll.com", - "exchangeuritems.gq", - "extraskinscs.xyz", - "ezwin24.ru", - "facecup.fun", - "faceiteasyleague.ru", - "fatown.net", - "fineleague.fun", - "fireopencase.com", - "fivetown.net", - "free-skins.ru", - "free-nitro.ru", - "freenitros.ru", - "free-nitros.ru", - "freenitroi.ru", - "g2-give.ru", - "g2-give.ru", - "game4roll.com", - "gameluck.ru", - "gamerich.xyz", - "games-roll.ga", - "games-roll.ml", - "games-roll.ru", - "gift4keys.com", - "giveavvay.com", - "giveawayskin.com", - "global-skins.gq", - "globalcsskins.xyz", - "globalskins.tk", - "goldendota.com", - "goodskins.gq", - "gosteamanalyst.com", - "gtakey.ru", - "go.rancah.com", - "giftsdiscord.ru", - "get-nitro.net", - "hellgiveaway.trade", - "hellstores.xyz", - "hltvcsgo.com", - "hltvgames.net", - "iemcup.com", - "keys-loot.com", - "knifespin.top", - "knifespin.top", - "knifespin.xyz", - "knifespins.xyz", - "knifez-roll.xyz", - "knifez-win.xyz", - "league-csgo.com", - "lehatop-01.ru", - "lootxmarket.com", - "loungeztrade.com", - "lucky-skins.xyz", - "makson-gta.ru", - "maxskins.xyz", - "mvcsgo.com", - "mvpcup.ru", - "mvptournament.com", - "mygames4roll.com", - "made-nitro.com", - "naviback.ru", - "night-skins.com", - "nitros-gift.com", - "nitro-discord.org", - "nwgwroqr.ru", - "ownerbets.com", - "oligarph.club", - "playerskinz.xyz", - "pubggift62.xyz", - "rangskins.com", - "rave-new.ru", - "roll-skins.ru", - "roll4knife.xyz", - "roll4tune.com", - "rollknfez.xyz", - "rollskin-simple.xyz", - "rushbskins.xyz", - "rushskins.xyz", - "s1mple-spin.xyz", - "sakuralive.ru.com", - "scale-navi.pp.ru", - "simple-knifez.xyz", - "simple-win.xyz", - "simplegamepro.ru", - "simpleroll-cs.xyz", - "simplespinz.xyz", - "simplewinz.xyz", - "skin-index.com", - "skin888trade.com", - "skincs-spin.top", - "skincs-spin.xyz", - "skinmarkets.net", - "skins-hub.top", - "skins-info.net", - "skins-jungle.xyz", - "skinsboost.ru", - "skinsdatabse.com", - "skinsind.com", - "skinsmind.ru", - "skinspace.ru", - "skinsplane.com", - "skinsplanes.com", - "skinsplanets.com", - "skinxinfo.net", - "skinxmarket.site", - "skinz-spin.top", - "skinz-spin.xyz", - "skinzjar.ru", - "skinzprize.xyz", - "skinzspin-cs.xyz", - "skinzspinz.xyz", - "sleanmconmunltiy.ru", - "spin-games.com", - "spin4skinzcs.top", - "spin4skinzcs.xyz", - "spinforskin.ml", - "sponsored-simple.xyz", - "staemcomnrnunitiy.ru.com", - "staemcomrnunity.store", - "staermcrommunity.me", - "staffstatsgo.com", - "starrygamble.com", - "stat-csgo.ru", - "stats-cs.ru", - "stceamcomminity.com", - "steam-analyst.ru", - "steam-trades.icu", - "steamanalysts.com", - "steamcomcunity.ru", - "steamcomminutiu.ru", - "steamcomminutiy.ru", - "steamcomminytiu.com", - "steamcomminytiu.ru", - "steamcomminytu.ru", - "steamcommnunily.com", - "steamcommnuninty.com", - "steamcommnuntiy.com", - "steamcommrutiny.ru", - "steamcommuniiy.ru", - "steamcommunily.uno", - "steamcommunityu.com", - "steamcommunityw.com", - "steamcommunlty.pro", - "steamcommunutiy.com", - "steamcommunytiu.ru", - "steamcommunytu.ru", - "steamcommutiny.com", - "steamcommynitu.ru", - "steamcomnmuituy.com", - "steamcomnumity.ru", - "steamcomrnunity.ru", - "steamcomrrnunity.com", - "steamcomrunity.com", - "steamconmunlty.com", - "steamcormmuntiy.com", - "steamgamesroll.ru", - "steamncommuniity.com", - "steamncommunity.com", - "steamnmcomunnity.co", - "steamoemmunity.com", - "steamsupportpowered.icu", - "steancommynity.ru.com", - "steancomnunytu.ru", - "steancomunnity.ru", - "steancomunyiti.ru", - "stearmcommunnitty.online", - "stearmmcomunitty.ru", - "stearmmcomunity.ru", - "stearmmcomuunity.ru", - "stearncomminuty.ru", - "stearncommunity.ru", - "stearncommunytiy.ru", - "stearncormmunity.com", - "steemcommnunity.ru", - "stemcommunnilty.com", - "stermccommunitty.ru", - "stermcommuniity.com", - "stewie2k-giveaway-150days.pro", - "stiemcommunitty.ru", - "store-stempowered.com", - "streamcommulinty.com", - "streamcommuninnity.com", - "streamcommuunnity.com", - "streamcomnumity.ru", - "streamcomunity.com", - "streammcomunnity.ru", - "streancommunuty.ru", - "streancommunuty.ru", - "strearmcommunity.ru", - "strearmcomunity.ru", - "steamcommunityu.ru", - "steamcommunrlity.com", - "stearncommuty.com", - "steamcommunitiyu.com", - "stermcommunnitty.ru", - "steamcommunitlu.com", - "steamcommunity.link", - "steancommunity.link", - "steamcomuniity.ru.com", - "steam-nitro.ru", - "sunnygamble.com", - "swapskins.live", - "test-domuin2.com", - "test-domuin3.ru", - "test-domuin4.ru", - "test-domuin5.ru", - "tf2market.store", - "tournamentt.com", - "ultimateskins.xyz", - "ultracup.fun", - "uspringcup.com", - "waterbets.ru", - "win-skin.top", - "win-skin.xyz", - "winknifespin.xyz", - "winskin-simple.xyz", - "winskins.top", - "wintheskin.xyz", - "xgamercup.com", - "stmeacomunnitty.ru", - "discrodnitro.org" -] diff --git a/src/lib/badwords.json b/src/lib/badwords.json deleted file mode 100644 index fc7a5d6..0000000 --- a/src/lib/badwords.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "nigger": 3, - "nigga": 3, - "retard": 2, - "retarted": 2, - "faggot": 2, - "slut": 1, - "whore": 1, - "卍": 3, - "found a cool software that improves the": 3, - "hi, bro h am leaving cs:go and giving away my skin": 3, - "hi friend, today i am leaving this fucking game": 3, - "hi guys, i'm leaving this fucking game, take my": 3, - "you can choose any skin for yourself": 3, - "discord nitro for free - steam store": 3, - "get 3 months of discord nitro": 3, - "get discord nitro for free": 3, - "free 3 months of discord nitro": 3, - "free discord nitro airdrop": 3 -} diff --git a/src/lib/extensions/discord-akairo/BushCommandHandler.ts b/src/lib/extensions/discord-akairo/BushCommandHandler.ts index 21984ab..44a0966 100644 --- a/src/lib/extensions/discord-akairo/BushCommandHandler.ts +++ b/src/lib/extensions/discord-akairo/BushCommandHandler.ts @@ -9,7 +9,6 @@ import { BushSlashMessage } from './BushSlashMessage'; export type BushCommandHandlerOptions = CommandHandlerOptions; const commandHandlerEvents = BushConstants.CommandHandlerEvents; -const blockedReasons = BushConstants.BlockedReasons; export interface BushCommandHandlerEvents extends CommandHandlerEvents { commandBlocked: [message: BushMessage, command: BushCommand, reason: string]; @@ -34,76 +33,17 @@ export class BushCommandHandler extends CommandHandler { super(client, options); } - // protected override setup(): void { - // super.setup(); - // } - public override async runPostTypeInhibitors(message: BushMessage, command: BushCommand, slash = false): Promise<boolean> { - if (command.ownerOnly) { - const isOwner = client.isOwner(message.author); - if (!isOwner) { - this.emit( - slash ? commandHandlerEvents.SLASH_BLOCKED : commandHandlerEvents.COMMAND_BLOCKED, - message, - command, - blockedReasons.OWNER - ); - return true; - } - } - - if (command.superUserOnly) { - const isSuperUser = client.isSuperUser(message.author); - if (!isSuperUser) { - this.emit( - slash ? commandHandlerEvents.SLASH_BLOCKED : commandHandlerEvents.COMMAND_BLOCKED, - message, - command, - blockedReasons.OWNER - ); - return true; - } - } - - if (command.channel === 'guild' && !message.guild) { - this.emit( - slash ? commandHandlerEvents.SLASH_BLOCKED : commandHandlerEvents.COMMAND_BLOCKED, - message, - command, - blockedReasons.GUILD - ); + const reason = this.inhibitorHandler ? await this.inhibitorHandler.test('post', message, command) : null; + if (reason != null) { + this.emit(slash ? commandHandlerEvents.SLASH_BLOCKED : commandHandlerEvents.COMMAND_BLOCKED, message, command, reason); return true; } - if (command.channel === 'dm' && message.guild) { - this.emit( - slash ? commandHandlerEvents.SLASH_BLOCKED : commandHandlerEvents.COMMAND_BLOCKED, - message, - command, - blockedReasons.DM - ); - return true; - } - if (command.restrictedChannels?.length && message.channel) { - if (!command.restrictedChannels.includes(message.channel.id)) { - this.emit(commandHandlerEvents.COMMAND_BLOCKED, message, command, blockedReasons.RESTRICTED_CHANNEL); - return true; - } - } - if (command.restrictedGuilds?.length && message.guild) { - if (!command.restrictedGuilds.includes(message.guild.id)) { - this.emit(commandHandlerEvents.COMMAND_BLOCKED, message, command, blockedReasons.RESTRICTED_GUILD); - return true; - } - } if (await this.runPermissionChecks(message, command)) { return true; } - const reason = this.inhibitorHandler ? await this.inhibitorHandler.test('post', message, command) : null; - if (reason != null) { - this.emit(commandHandlerEvents.COMMAND_BLOCKED, message, command, reason); - return true; - } + return !!this.runCooldowns(message, command); } } diff --git a/src/lib/extensions/discord-akairo/BushSlashMessage.ts b/src/lib/extensions/discord-akairo/BushSlashMessage.ts index 215cf79..d10a024 100644 --- a/src/lib/extensions/discord-akairo/BushSlashMessage.ts +++ b/src/lib/extensions/discord-akairo/BushSlashMessage.ts @@ -10,10 +10,13 @@ import { BushCommandUtil } from './BushCommandUtil'; export class BushSlashMessage extends AkairoMessage { public declare client: BushClient; public declare util: BushCommandUtil; - public declare guild: BushGuild; public declare author: BushUser; public declare member: BushGuildMember; public constructor(client: BushClient, interaction: CommandInteraction, command: BushCommand) { super(client, interaction, command); } + + public override get guild(): BushGuild | null { + return super.guild as BushGuild | null; + } } |