Skip to content

Commit 3bbc805

Browse files
Techbot121Meta Construct
authored andcommitted
add emoji and move response to try block
1 parent 3b2441b commit 3bbc805

File tree

1 file changed

+27
-26
lines changed
  • app/services/discord/modules/commands/developer

1 file changed

+27
-26
lines changed

app/services/discord/modules/commands/developer/Gserv.ts

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const SERVER_EMOJI_MAP = {
1717
"1": "1️⃣",
1818
"2": "2️⃣",
1919
"3": "3️⃣",
20+
"4": "4️⃣",
2021
};
2122

2223
const gserv = async (
@@ -85,33 +86,33 @@ export const SlashGservCommand: SlashCommand = {
8586
return;
8687
}
8788

88-
const response = await ctx.reply({
89-
content: "What command do you want to run?",
90-
components: [
91-
{
92-
type: Discord.ComponentType.ActionRow,
93-
components: [
94-
{
95-
type: Discord.ComponentType.StringSelect,
96-
custom_id: "gserv_command",
97-
placeholder: "Choose a command.",
98-
min_values: 1,
99-
max_values: VALID_GSERV_COMMANDS.length,
100-
options: VALID_GSERV_COMMANDS.map(
101-
cmd =>
102-
<Discord.APISelectMenuOption>{
103-
label: cmd[0],
104-
value: cmd[0],
105-
description: cmd[1],
106-
}
107-
),
108-
},
109-
],
110-
},
111-
],
112-
});
113-
11489
try {
90+
const response = await ctx.reply({
91+
content: "What command do you want to run?",
92+
components: [
93+
{
94+
type: Discord.ComponentType.ActionRow,
95+
components: [
96+
{
97+
type: Discord.ComponentType.StringSelect,
98+
custom_id: "gserv_command",
99+
placeholder: "Choose a command.",
100+
min_values: 1,
101+
max_values: VALID_GSERV_COMMANDS.length,
102+
options: VALID_GSERV_COMMANDS.map(
103+
cmd =>
104+
<Discord.APISelectMenuOption>{
105+
label: cmd[0],
106+
value: cmd[0],
107+
description: cmd[1],
108+
}
109+
),
110+
},
111+
],
112+
},
113+
],
114+
});
115+
115116
const result = await response.awaitMessageComponent({
116117
componentType: Discord.ComponentType.StringSelect,
117118
filter: filter,

0 commit comments

Comments
 (0)