move command list to discord adapter
This commit is contained in:
		@@ -1,4 +1,6 @@
 | 
			
		||||
import { CommandInteraction } from "discord.js"
 | 
			
		||||
import { localized_string } from "./interfaces"
 | 
			
		||||
import RegistrationHandler from "./RegistrationHandler"
 | 
			
		||||
 | 
			
		||||
export const reactions = {
 | 
			
		||||
	troll_grin: "U+1F92A",
 | 
			
		||||
@@ -15,35 +17,15 @@ export const commands = {
 | 
			
		||||
export interface discordCommand {
 | 
			
		||||
	name: 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 = {
 | 
			
		||||
	greeting: {
 | 
			
		||||
		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 :)"
 | 
			
		||||
	},
 | 
			
		||||
	fmt_regsitered_user: {
 | 
			
		||||
	fmt_registered_user: {
 | 
			
		||||
		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}."
 | 
			
		||||
	},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user