diff --git a/src/commands/Misc/remindme.ts b/src/commands/Misc/remindme.ts index 35214df8fcc..818ed6623f8 100644 --- a/src/commands/Misc/remindme.ts +++ b/src/commands/Misc/remindme.ts @@ -2,7 +2,8 @@ import type { ScheduleEntity } from '#lib/database'; import { LanguageKeys } from '#lib/i18n/languageKeys'; import { SkyraCommand, SkyraPaginatedMessage } from '#lib/structures'; import { Schedules } from '#lib/types/Enums'; -import { getColor, getTerylInviteComponentRow, sendLoadingMessage } from '#utils/util'; +import { ButtonInviteTeryl, ButtonSkyraV7, makeRow } from '#utils/deprecate'; +import { getColor, sendLoadingMessage } from '#utils/util'; import { ApplyOptions, RequiresClientPermissions } from '@sapphire/decorators'; import { Args } from '@sapphire/framework'; import { send } from '@sapphire/plugin-editable-commands'; @@ -24,6 +25,8 @@ interface ReminderScheduledTask extends ScheduleEntity { }; } +const row = makeRow(ButtonInviteTeryl, ButtonSkyraV7); + @ApplyOptions({ aliases: ['rmm', 'remind', 'reminder', 'reminders'], description: LanguageKeys.Commands.Misc.RemindMeDescription, @@ -37,7 +40,7 @@ export class UserCommand extends SkyraCommand { public async create(message: Message, args: SkyraCommand.Args) { const content = args.t(LanguageKeys.Commands.Misc.RemindMeDeprecated); - return send(message, { content, components: [getTerylInviteComponentRow()] }); + return send(message, { content, components: [row] }); } @RequiresClientPermissions(PermissionFlagsBits.EmbedLinks) diff --git a/src/commands/Tags/tag.ts b/src/commands/Tags/tag.ts index 635adbeae8a..cf3b1b670d9 100644 --- a/src/commands/Tags/tag.ts +++ b/src/commands/Tags/tag.ts @@ -5,7 +5,8 @@ import { SkyraCommand, SkyraPaginatedMessage } from '#lib/structures'; import type { GuildMessage } from '#lib/types'; import { PermissionLevels } from '#lib/types/Enums'; import { RequiresLevel } from '#utils/decorators'; -import { getColor, getTerylInviteComponentRow, sendLoadingMessage } from '#utils/util'; +import { ButtonInviteTeryl, ButtonSkyraV7, makeRow } from '#utils/deprecate'; +import { getColor, sendLoadingMessage } from '#utils/util'; import { ApplyOptions, RequiresClientPermissions } from '@sapphire/decorators'; import { CommandOptionsRunTypeEnum } from '@sapphire/framework'; import { send } from '@sapphire/plugin-editable-commands'; @@ -13,6 +14,8 @@ import { chunk, codeBlock } from '@sapphire/utilities'; import { PermissionFlagsBits } from 'discord-api-types/v9'; import { MessageEmbed, MessageOptions } from 'discord.js'; +const row = makeRow(ButtonInviteTeryl, ButtonSkyraV7); + @ApplyOptions({ aliases: ['tags', 'custom-command', 'copy-pasta'], description: LanguageKeys.Commands.Tags.TagDescription, @@ -63,7 +66,7 @@ export class UserCommand extends SkyraCommand { @RequiresLevel(PermissionLevels.Moderator, LanguageKeys.Commands.Tags.TagPermissionLevel) public async deprecated(message: GuildMessage, args: SkyraCommand.Args) { const content = args.t(LanguageKeys.Commands.Tags.Deprecated); - return send(message, { content, components: [getTerylInviteComponentRow()] }); + return send(message, { content, components: [row] }); } @RequiresClientPermissions(PermissionFlagsBits.EmbedLinks) diff --git a/src/languages/en-US/commands/misc.json b/src/languages/en-US/commands/misc.json index 80bf1d6e150..8ad3b42228b 100644 --- a/src/languages/en-US/commands/misc.json +++ b/src/languages/en-US/commands/misc.json @@ -199,7 +199,7 @@ "remindmeShowFooter": "ID: {{id}} | Ends at:", "remindmeInvalidId": "I am sorry, but the ID provided does not seem to be valid.", "remindmeNotfound": "I cannot find something here. The reminder either never existed or it ended.", - "remindmeDeprecated": "**Notice**: This command has been moved to Teryl and will be removed from Skyra around . Consider inviting him before then with the button below.", + "remindmeDeprecated": "The reminder functionality has been deprecated and will be removed around . Please use from Teryl instead. You may need to invite the bot with the button below if the command doesn't work.", "shipDescription": "Ships 2 members", "shipExtended": { "usages": [ diff --git a/src/languages/en-US/commands/tags.json b/src/languages/en-US/commands/tags.json index 57a1eab29a7..ffe843c54bc 100644 --- a/src/languages/en-US/commands/tags.json +++ b/src/languages/en-US/commands/tags.json @@ -40,5 +40,5 @@ "nameNotAllowed": "A tag name may not have a grave accent nor invisible characters.", "nameTooLong": "A tag name must be 50 or less characters long.", "notExists": "The tag `{{tag}}` does not exist.", - "deprecated": "**Notice**: This command has been moved to Teryl and will be removed from Skyra on . Consider inviting him before then with the button below." + "deprecated": "The tag functionality has been deprecated and will be removed around . Please use from Teryl instead. You may need to invite the bot with the button below if the command doesn't work." } diff --git a/src/lib/util/util.ts b/src/lib/util/util.ts index adda25321fc..e669fc20261 100644 --- a/src/lib/util/util.ts +++ b/src/lib/util/util.ts @@ -1,17 +1,15 @@ import { LanguageKeys } from '#lib/i18n/languageKeys'; import type { GuildMessage } from '#lib/types'; -import { ButtonBuilder } from '@discordjs/builders'; import { send } from '@sapphire/plugin-editable-commands'; import { isNullishOrEmpty, Nullish, tryParseURL } from '@sapphire/utilities'; import { loadImage, type Image } from 'canvas-constructor/napi-rs'; -import { APIUser, ButtonStyle } from 'discord-api-types/v9'; +import type { APIUser } from 'discord-api-types/v9'; import { AllowedImageSize, Guild, GuildChannel, ImageURLOptions, Message, - MessageActionRow, MessageEmbed, MessageMentionTypes, Permissions, @@ -20,7 +18,7 @@ import { UserResolvable } from 'discord.js'; import type { TFunction } from 'i18next'; -import { BrandingColors, Invites, ZeroWidthSpace } from './constants'; +import { BrandingColors, ZeroWidthSpace } from './constants'; const ONE_TO_TEN = new Map([ [0, { emoji: '😪', color: 0x5b1100 }], @@ -309,12 +307,6 @@ export function getColor(message: Message) { return message.member?.displayColor ?? BrandingColors.Primary; } -export function getTerylInviteComponentRow() { - return new MessageActionRow().addComponents([ - new ButtonBuilder().setLabel('Invite Teryl').setStyle(ButtonStyle.Link).setURL(Invites.Teryl).toJSON() - ]); -} - export interface UtilOneToTenEntry { emoji: string; color: number;