aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-05 23:24:51 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-05 23:24:51 -0400
commit1feb515882cfbbf33dc98d75a54898c1735cf5cb (patch)
tree20386e9d6ca6b5cb978283d672528c03647ec32f /src/commands
parente68a0193b9f5888455f631d72c8783fc50e35faf (diff)
parent060349fcabe9e073eca9f6fd334e3355a9756096 (diff)
downloadtanzanite-1feb515882cfbbf33dc98d75a54898c1735cf5cb.tar.gz
tanzanite-1feb515882cfbbf33dc98d75a54898c1735cf5cb.tar.bz2
tanzanite-1feb515882cfbbf33dc98d75a54898c1735cf5cb.zip
Merge branch 'wip'
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/admin/channelPermissions.ts2
-rw-r--r--src/commands/admin/roleAll.ts2
-rw-r--r--src/commands/config/blacklist.ts2
-rw-r--r--src/commands/config/config.ts2
-rw-r--r--src/commands/config/disable.ts2
-rw-r--r--src/commands/config/features.ts2
-rw-r--r--src/commands/config/log.ts2
-rw-r--r--src/commands/dev/eval.ts2
-rw-r--r--src/commands/dev/javascript.ts2
-rw-r--r--src/commands/dev/sh.ts2
-rw-r--r--src/commands/fun/minesweeper.ts2
-rw-r--r--src/commands/info/botInfo.ts2
-rw-r--r--src/commands/info/color.ts2
-rw-r--r--src/commands/info/guildInfo.ts2
-rw-r--r--src/commands/info/help.ts2
-rw-r--r--src/commands/info/icon.ts2
-rw-r--r--src/commands/info/inviteInfo.ts43
-rw-r--r--src/commands/info/links.ts2
-rw-r--r--src/commands/info/userInfo.ts6
-rw-r--r--src/commands/leveling/leaderboard.ts2
-rw-r--r--src/commands/leveling/level.ts2
-rw-r--r--src/commands/leveling/levelRoles.ts2
-rw-r--r--src/commands/leveling/setLevel.ts2
-rw-r--r--src/commands/leveling/setXp.ts2
-rw-r--r--src/commands/moderation/ban.ts2
-rw-r--r--src/commands/moderation/block.ts2
-rw-r--r--src/commands/moderation/evidence.ts2
-rw-r--r--src/commands/moderation/hideCase.ts2
-rw-r--r--src/commands/moderation/kick.ts2
-rw-r--r--src/commands/moderation/lockdown.ts2
-rw-r--r--src/commands/moderation/massBan.ts2
-rw-r--r--src/commands/moderation/massEvidence.ts2
-rw-r--r--src/commands/moderation/modlog.ts2
-rw-r--r--src/commands/moderation/mute.ts2
-rw-r--r--src/commands/moderation/purge.ts2
-rw-r--r--src/commands/moderation/removeReactionEmoji.ts2
-rw-r--r--src/commands/moderation/role.ts2
-rw-r--r--src/commands/moderation/slowmode.ts2
-rw-r--r--src/commands/moderation/timeout.ts2
-rw-r--r--src/commands/moderation/unban.ts2
-rw-r--r--src/commands/moderation/unblock.ts2
-rw-r--r--src/commands/moderation/unmute.ts2
-rw-r--r--src/commands/moderation/untimeout.ts2
-rw-r--r--src/commands/moderation/warn.ts2
-rw-r--r--src/commands/moulberry-bush/capes.ts2
-rw-r--r--src/commands/moulberry-bush/giveawayPing.ts8
-rw-r--r--src/commands/moulberry-bush/moulHammer.ts16
-rw-r--r--src/commands/moulberry-bush/neuRepo.ts193
-rw-r--r--src/commands/moulberry-bush/report.ts6
-rw-r--r--src/commands/moulberry-bush/rule.ts5
-rw-r--r--src/commands/moulberry-bush/serverStatus.ts2
-rw-r--r--src/commands/moulberry-bush/solved.ts44
-rw-r--r--src/commands/tickets/ticket-!.ts65
-rw-r--r--src/commands/tickets/ticket-create.ts0
-rw-r--r--src/commands/utilities/calculator.ts2
-rw-r--r--src/commands/utilities/hash.ts2
-rw-r--r--src/commands/utilities/highlight-!.ts5
-rw-r--r--src/commands/utilities/highlight-add.ts2
-rw-r--r--src/commands/utilities/highlight-block.ts2
-rw-r--r--src/commands/utilities/highlight-clear.ts2
-rw-r--r--src/commands/utilities/highlight-matches.ts2
-rw-r--r--src/commands/utilities/highlight-remove.ts2
-rw-r--r--src/commands/utilities/highlight-show.ts2
-rw-r--r--src/commands/utilities/highlight-unblock.ts2
-rw-r--r--src/commands/utilities/price.ts2
-rw-r--r--src/commands/utilities/reminders.ts2
-rw-r--r--src/commands/utilities/steal.ts2
-rw-r--r--src/commands/utilities/viewRaw.ts2
-rw-r--r--src/commands/utilities/whoHasRole.ts2
-rw-r--r--src/commands/utilities/wolframAlpha.ts2
70 files changed, 431 insertions, 78 deletions
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts
index 15a1128..0b09e54 100644
--- a/src/commands/admin/channelPermissions.ts
+++ b/src/commands/admin/channelPermissions.ts
@@ -9,7 +9,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class ChannelPermissionsCommand extends BushCommand {
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts
index c731f08..a48bd6b 100644
--- a/src/commands/admin/roleAll.ts
+++ b/src/commands/admin/roleAll.ts
@@ -8,7 +8,7 @@ import {
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js';
export default class RoleAllCommand extends BushCommand {
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 6768a1c..a098f9d 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -10,7 +10,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, GuildMember, PermissionFlagsBits, User } from 'discord.js';
export default class BlacklistCommand extends BushCommand {
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index c562add..cbfc5f7 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -14,7 +14,7 @@ import {
type GuildSettingType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { type ArgumentGeneratorReturn, type SlashOption } from 'discord-akairo';
import {
diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts
index e9866d5..00dea76 100644
--- a/src/commands/config/disable.ts
+++ b/src/commands/config/disable.ts
@@ -9,7 +9,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, AutocompleteInteraction, PermissionFlagsBits } from 'discord.js';
import Fuse from 'fuse.js';
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index 5eafb0c..625086a 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -9,7 +9,7 @@ import {
type GuildFeatures,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import {
ActionRowBuilder,
ComponentType,
diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts
index 3726105..f79f60e 100644
--- a/src/commands/config/log.ts
+++ b/src/commands/config/log.ts
@@ -9,7 +9,7 @@ import {
type GuildLogType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ArgumentGeneratorReturn } from 'discord-akairo';
import { ApplicationCommandOptionType, ChannelType, PermissionFlagsBits } from 'discord.js';
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index ab7787d..a4a52b5 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -20,7 +20,7 @@ import {
type SlashMessage
} from '#lib';
import { Snowflake as Snowflake_ } from '@sapphire/snowflake';
-import assert from 'assert';
+import assert from 'assert/strict';
import { Canvas } from 'canvas';
import { exec } from 'child_process';
import {
diff --git a/src/commands/dev/javascript.ts b/src/commands/dev/javascript.ts
index 6b6c7e1..12ad6f7 100644
--- a/src/commands/dev/javascript.ts
+++ b/src/commands/dev/javascript.ts
@@ -8,7 +8,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, EmbedBuilder } from 'discord.js';
import { VM } from 'vm2';
assert(VM);
diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts
index 1b9ce22..609129d 100644
--- a/src/commands/dev/sh.ts
+++ b/src/commands/dev/sh.ts
@@ -8,7 +8,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import chalk from 'chalk';
import { exec } from 'child_process';
import { ApplicationCommandOptionType, cleanCodeBlockContent, EmbedBuilder } from 'discord.js';
diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts
index c2fdccf..f2db6ee 100644
--- a/src/commands/fun/minesweeper.ts
+++ b/src/commands/fun/minesweeper.ts
@@ -8,7 +8,7 @@ import {
type SlashMessage
} from '#lib';
import { Minesweeper } from '@notenoughupdates/discord.js-minesweeper';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType } from 'discord.js';
assert(Minesweeper);
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index f284e0f..d84fd4e 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -7,7 +7,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { EmbedBuilder, PermissionFlagsBits, version as discordJSVersion } from 'discord.js';
import * as os from 'os';
const { default: prettyBytes } = await import('pretty-bytes');
diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts
index 7286c5c..7601562 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -8,7 +8,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, EmbedBuilder, GuildMember, PermissionFlagsBits, Role } from 'discord.js';
import tinycolor from 'tinycolor2';
assert(tinycolor);
diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts
index dd5704f..e67cdf4 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -12,7 +12,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import {
ApplicationCommandOptionType,
ChannelType,
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 1a8eae5..492f25d 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -9,7 +9,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import {
ActionRowBuilder,
ApplicationCommandOptionType,
diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts
index e66f900..b3434ec 100644
--- a/src/commands/info/icon.ts
+++ b/src/commands/info/icon.ts
@@ -1,5 +1,5 @@
import { BushCommand, clientSendAndPermCheck, colors, type CommandMessage, type SlashMessage } from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { EmbedBuilder, escapeMarkdown, PermissionFlagsBits } from 'discord.js';
export default class IconCommand extends BushCommand {
diff --git a/src/commands/info/inviteInfo.ts b/src/commands/info/inviteInfo.ts
new file mode 100644
index 0000000..5df86ad
--- /dev/null
+++ b/src/commands/info/inviteInfo.ts
@@ -0,0 +1,43 @@
+import { Arg, ArgType, BushCommand, clientSendAndPermCheck, colors, type CommandMessage, type SlashMessage } from '#lib';
+import { ApplicationCommandOptionType, EmbedBuilder, Invite, PermissionFlagsBits } from 'discord.js';
+
+export default class InviteInfoCommand extends BushCommand {
+ public constructor() {
+ super('inviteInfo', {
+ aliases: ['invite-info', 'ii'],
+ category: 'info',
+ description: 'Get info about an invite.',
+ usage: ['invite-info [invite]'],
+ examples: ['invite-info discord.gg/moulberry'],
+ args: [
+ {
+ id: 'invite',
+ description: 'The guild to find information about.',
+ type: 'invite',
+ prompt: 'What invite would you like to find information about?',
+ retry: '{error} Choose a valid invite to find information about.',
+ slashType: ApplicationCommandOptionType.String
+ }
+ ],
+ slash: true,
+ clientPermissions: (m) => clientSendAndPermCheck(m, [PermissionFlagsBits.EmbedLinks], true),
+ userPermissions: []
+ });
+ }
+
+ public override async exec(message: CommandMessage | SlashMessage, args: { invite: ArgType<'invite' | 'string'> }) {
+ const invite = message.util.isSlashMessage(message)
+ ? ((await Arg.cast('invite', message, args.invite as string)) as ArgType<'invite'>)
+ : (args.invite as Invite);
+
+ const inviteInfoEmbed = new EmbedBuilder().setTitle(`Invite to ${invite.guild!.name}`).setColor(colors.default);
+
+ this.generateAboutField(inviteInfoEmbed, invite);
+ }
+
+ private generateAboutField(embed: EmbedBuilder, invite: Invite) {
+ const about = [`**code:** ${invite.code}`, `**channel:** ${invite.channel!.name}`];
+
+ embed.addFields({ name: '» About', value: about.join('\n') });
+ }
+}
diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts
index 3c7add2..3dbdbef 100644
--- a/src/commands/info/links.ts
+++ b/src/commands/info/links.ts
@@ -1,5 +1,5 @@
import { BushCommand, clientSendAndPermCheck, invite, type CommandMessage, type SlashMessage } from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from 'discord.js';
import packageDotJSON from '../../../package.json' assert { type: 'json' };
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 3479ea3..7b67816 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -162,11 +162,11 @@ export default class UserInfoCommand extends BushCommand {
);
if (member.premiumSince) serverUserInfo.push(`**Booster Since:** ${timestampAndDelta(member.premiumSince, 'd')}`);
if (member.displayHexColor) serverUserInfo.push(`**Display Color:** ${member.displayHexColor}`);
- if (member.user.id == '322862723090219008' && member.guild?.id == mappings.guilds.bush)
+ if (member.user.id == mappings.users['IRONM00N'] && member.guild?.id == mappings.guilds["Moulberry's Bush"])
serverUserInfo.push(`**General Deletions:** 1⅓`);
if (
- (['384620942577369088', '496409778822709251'] as const).includes(member.user.id) &&
- member.guild.id == mappings.guilds.bush
+ ([mappings.users['nopo'], mappings.users['Bestower']] as const).includes(member.user.id) &&
+ member.guild.id == mappings.guilds["Moulberry's Bush"]
)
serverUserInfo.push(`**General Deletions:** ⅓`);
if (member?.nickname) serverUserInfo.push(`**Nickname:** ${escapeMarkdown(member?.nickname)}`);
diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts
index 7eef990..bb41a12 100644
--- a/src/commands/leveling/leaderboard.ts
+++ b/src/commands/leveling/leaderboard.ts
@@ -9,7 +9,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class LeaderboardCommand extends BushCommand {
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts
index 7888695..eda43f2 100644
--- a/src/commands/leveling/level.ts
+++ b/src/commands/leveling/level.ts
@@ -10,7 +10,7 @@ import {
type SlashMessage
} from '#lib';
import { SimplifyNumber } from '@notenoughupdates/simplify-number';
-import assert from 'assert';
+import assert from 'assert/strict';
import canvas from 'canvas';
import { ApplicationCommandOptionType, AttachmentBuilder, Guild, PermissionFlagsBits, User } from 'discord.js';
import got from 'got';
diff --git a/src/commands/leveling/levelRoles.ts b/src/commands/leveling/levelRoles.ts
index 470cf58..312623c 100644
--- a/src/commands/leveling/levelRoles.ts
+++ b/src/commands/leveling/levelRoles.ts
@@ -8,7 +8,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class LevelRolesCommand extends BushCommand {
diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts
index b1d9516..8dc1cdf 100644
--- a/src/commands/leveling/setLevel.ts
+++ b/src/commands/leveling/setLevel.ts
@@ -9,7 +9,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class SetLevelCommand extends BushCommand {
diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts
index 96b3ad7..5cd3a61 100644
--- a/src/commands/leveling/setXp.ts
+++ b/src/commands/leveling/setXp.ts
@@ -9,7 +9,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, PermissionFlagsBits } from 'discord.js';
export default class SetXpCommand extends BushCommand {
diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts
index 1b045aa..00fde01 100644
--- a/src/commands/moderation/ban.ts
+++ b/src/commands/moderation/ban.ts
@@ -13,7 +13,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, PermissionFlagsBits, type User } from 'discord.js';
export default class BanCommand extends BushCommand {
diff --git a/src/commands/moderation/block.ts b/src/commands/moderation/block.ts
index 48436eb..00a1996 100644
--- a/src/commands/moderation/block.ts
+++ b/src/commands/moderation/block.ts
@@ -14,7 +14,7 @@ import {
type OptArgType,
type SlashMessage
} from '#lib';
-import assert from 'assert';
+import assert from 'assert/strict';
import { ApplicationCommandOptionType, PermissionFlagsBits, type GuildMember } from 'discord.js';
export default class BlockCommand extends BushCommand {
diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts
index f480844..d36000f 100644
--- a/src/commands/moderation/evidence.ts
+++ b/src/commands/moderation/evidence.ts
@@ -11,7 +11,7 @@ import {