move command list to discord adapter

This commit is contained in:
mightypanders 2021-11-11 01:00:30 +01:00
parent ce18abeb36
commit 29c74717e2
1 changed files with 5 additions and 23 deletions

View File

@ -1,4 +1,6 @@
import { CommandInteraction } from "discord.js"
import { localized_string } from "./interfaces" import { localized_string } from "./interfaces"
import RegistrationHandler from "./RegistrationHandler"
export const reactions = { export const reactions = {
troll_grin: "U+1F92A", troll_grin: "U+1F92A",
@ -15,35 +17,15 @@ export const commands = {
export interface discordCommand { export interface discordCommand {
name: string, name: string,
description: string description: string
options?: any[]
performCommand(interaction: CommandInteraction, registration: RegistrationHandler): Promise<void>
} }
export const commandList: discordCommand[] = [
{
name: commands.LIST_COMMAND,
description: "Lists all registerd users"
},
{
name: commands.REMOVE_COMMAND,
description: "Remove the mapping for this discord user"
},
{
name: commands.REGISTER_COMMAND,
description: "Register the senders discord name for a supplied steam name"
},
{
name: commands.SHOW_FOR_STEAM_COMMAND,
description: "Show the discord that's registered for a steam name"
},
{
name: commands.SHOW_COMMAND,
description: "Show the Steamname that's registered for this discord name"
}
]
export const msg_strings: localized_string = { export const msg_strings: localized_string = {
greeting: { greeting: {
german: "Ich wurde neugestartet. Bitte registriert euch erneut, falls ihr automatisch gemutet werden wollt :)", german: "Ich wurde neugestartet. Bitte registriert euch erneut, falls ihr automatisch gemutet werden wollt :)",
english: "I have been restarted. Please register again if you want to be muted automatically :)" english: "I have been restarted. Please register again if you want to be muted automatically :)"
}, },
fmt_regsitered_user: { fmt_registered_user: {
german: "Habe den Steamname {steam_name} mit dem Discordnamen {discord_name} verknüpft.", german: "Habe den Steamname {steam_name} mit dem Discordnamen {discord_name} verknüpft.",
english: "Registered the steam name {steam_name} for the discord name {discord_name}." english: "Registered the steam name {steam_name} for the discord name {discord_name}."
}, },