Skip to content

Commit

Permalink
feat: add old command with deprecated message, removed env twitch
Browse files Browse the repository at this point in the history
  • Loading branch information
RedStar071 committed Jun 27, 2024
1 parent b7d988a commit 94bd273
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 14 deletions.
4 changes: 0 additions & 4 deletions src/.env
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ OAUTH_REDIRECT_URI='http://127.0.0.1:3000/oauth/callback'
OAUTH_SCOPE='identify guilds'
OAUTH_SECRET=''

TWITCH_CALLBACK='http://localhost/twitch/event_sub_verify/'

PGSQL_DATABASE_URL='postgresql://postgres:postgres@localhost:5432/postgres'
TYPEORM_DEBUG_LOGS=false

Expand All @@ -46,5 +44,3 @@ DISCORD_BOT_LIST_TOKEN=''
DISCORD_BOTS_TOKEN=''
SENTRY_URL=''
TOP_GG_TOKEN=''
TWITCH_CLIENT_ID=''
TWITCH_TOKEN=''
5 changes: 0 additions & 5 deletions src/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ API_HOST='127.0.0.1'

OAUTH_SECRET=''

TWITCH_CALLBACK='http://localhost/twitch/event_sub_verify/'

PGSQL_DATABASE_URL='postgresql://postgres:postgres@localhost:5432/wolfstar'
TYPEORM_DEBUG_LOGS=false

Expand All @@ -36,6 +34,3 @@ DISCORD_BOT_LIST_TOKEN=''
DISCORD_BOTS_TOKEN=''
SENTRY_URL=''
TOP_GG_TOKEN=''
TWITCH_CLIENT_ID=''
TWITCH_EVENTSUB_SECRET=''
TWITCH_TOKEN=''
43 changes: 43 additions & 0 deletions src/commands/Twitch/twitchsubscription.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { WolfCommand, WolfSubcommand } from '#lib/structures';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { ButtonWolfV7, makeRemovedMessage, makeRow } from '#utils/deprecate';
import { ApplyOptions, RequiresClientPermissions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
import { PermissionFlagsBits } from 'discord.js';

const row = makeRow(ButtonWolfV7);

@ApplyOptions<WolfSubcommand.Options>({
aliases: ['twitch-subscription', 't-subscription', 't-sub'],
description: LanguageKeys.Commands.General.V7Description,
detailedDescription: LanguageKeys.Commands.General.V7Extended,
permissionLevel: PermissionLevels.Administrator,
requiredClientPermissions: [PermissionFlagsBits.EmbedLinks],
runIn: [CommandOptionsRunTypeEnum.GuildAny],
subcommands: [
{ name: 'add', messageRun: 'add' },
{ name: 'remove', messageRun: 'remove' },
{ name: 'reset', messageRun: 'reset' },
{ name: 'show', messageRun: 'show', default: true }
]
})
export class UserCommand extends WolfSubcommand {
public async add(message: GuildMessage, args: WolfSubcommand.Args) {
return send(message, makeRemovedMessage(args.commandContext.commandName, row));
}

public async remove(message: GuildMessage, args: WolfCommand.Args) {
return send(message, makeRemovedMessage(args.commandContext.commandName, row));
}

public async reset(message: GuildMessage, args: WolfCommand.Args) {
return send(message, makeRemovedMessage(args.commandContext.commandName, row));
}

@RequiresClientPermissions(PermissionFlagsBits.EmbedLinks)
public async show(message: GuildMessage, args: WolfCommand.Args) {
return send(message, makeRemovedMessage(args.commandContext.commandName, row));
}
}
5 changes: 0 additions & 5 deletions src/lib/types/Augments.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ declare module '@skyra/env-utilities' {
OAUTH_SCOPE: ArrayString;
OAUTH_SECRET: string;

TWITCH_CALLBACK: string;

PGSQL_DATABASE_URL: string;
TYPEORM_DEBUG_LOGS: BooleanString;

Expand All @@ -163,8 +161,5 @@ declare module '@skyra/env-utilities' {
DISCORD_BOTS_TOKEN: string;
SENTRY_URL: string;
TOP_GG_TOKEN: string;
TWITCH_CLIENT_ID: string;
TWITCH_EVENTSUB_SECRET: string;
TWITCH_TOKEN: string;
}
}

0 comments on commit 94bd273

Please sign in to comment.