Skip to content

Commit 13ab01f

Browse files
committed
make LNReader group commands
1 parent 61a68b7 commit 13ab01f

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

src/commands/General/dataHelper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import { ApplicationCommandOptionType, CommandInteraction, EmbedBuilder } from "
44
import { Discord } from "discordx";
55

66
@Discord()
7-
@Category('General')
7+
@Category('LNReader')
88
export default class DataHelperCommand {
99
@Slash({name: 'migrate'})
1010
async migrate(
1111
@SlashChoice(...['v1.1.19', 'v2.0.0-beta.1'])
1212
@SlashOption({
1313
name: 'version',
1414
description: 'Your current version',
15-
type: ApplicationCommandOptionType.String
15+
type: ApplicationCommandOptionType.String,
16+
localizationSource: 'COMMANDS.MIGRATE.DESCRIPTION'
1617
})
1718
version: string,
1819
interaction: CommandInteraction

src/commands/General/plugins.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Plugin } from "@/entities";
88
import { pluginRepoVersion } from "@/utils/constants/plugins";
99

1010
@Discord()
11-
@Category('General')
11+
@Category('LNReader')
1212
@Injectable()
1313
export default class PluginsCommand {
1414
constructor(
@@ -21,7 +21,8 @@ export default class PluginsCommand {
2121
description: "Filter plugins with language",
2222
name: 'language',
2323
type: ApplicationCommandOptionType.String,
24-
required: false
24+
required: false,
25+
localizationSource: 'COMMANDS.PLUGINS.DESCRIPTION'
2526
})
2627
language: string,
2728
@SlashOption({
@@ -74,7 +75,8 @@ export default class PluginsCommand {
7475
name: "repo",
7576
type: ApplicationCommandOptionType.String,
7677
required: true,
77-
description: "Choose repo to make issue/request"
78+
description: "Choose repo to make issue/request",
79+
localizationSource: 'COMMANDS.ISSUE.DESCRIPTION'
7880
})
7981
repo: string,
8082
interaction: CommandInteraction

src/i18n/en/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ const en = {
6565
DESCRIPTION: 'Pong!',
6666
MESSAGE: '{member:string} Pong! The message round-trip took {time:number}ms.{heartbeat:string}',
6767
},
68+
PLUGINS: {
69+
DESCRIPTION: 'Plugins info',
70+
},
71+
ISSUE: {
72+
DESCRIPTION: 'Report issue/request',
73+
},
74+
MIGRATE: {
75+
DESCRIPTION: 'Migration helper',
76+
},
6877
},
6978
} satisfies BaseTranslation
7079

src/i18n/i18n-types.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,24 @@ type RootTranslation = {
171171
*/
172172
MESSAGE: RequiredParams<'heartbeat' | 'member' | 'time'>
173173
}
174+
PLUGINS: {
175+
/**
176+
* P​l​u​g​i​n​s​ ​i​n​f​o
177+
*/
178+
DESCRIPTION: string
179+
}
180+
ISSUE: {
181+
/**
182+
* R​e​p​o​r​t​ ​i​s​s​u​e​/​r​e​q​u​e​s​t
183+
*/
184+
DESCRIPTION: string
185+
}
186+
MIGRATE: {
187+
/**
188+
* M​i​g​r​a​t​i​o​n​ ​h​e​l​p​e​r
189+
*/
190+
DESCRIPTION: string
191+
}
174192
}
175193
}
176194

@@ -322,6 +340,24 @@ export type TranslationFunctions = {
322340
*/
323341
MESSAGE: (arg: { heartbeat: string, member: string, time: number }) => LocalizedString
324342
}
343+
PLUGINS: {
344+
/**
345+
* Plugins info
346+
*/
347+
DESCRIPTION: () => LocalizedString
348+
}
349+
ISSUE: {
350+
/**
351+
* Report issue/request
352+
*/
353+
DESCRIPTION: () => LocalizedString
354+
}
355+
MIGRATE: {
356+
/**
357+
* Migration helper
358+
*/
359+
DESCRIPTION: () => LocalizedString
360+
}
325361
}
326362
}
327363

0 commit comments

Comments
 (0)