Skip to content

Commit 795bb12

Browse files
committed
Adjust the /uwc command to change voting options,
streamlining them.
1 parent a56d131 commit 795bb12

2 files changed

Lines changed: 20 additions & 25 deletions

File tree

src/slash-commands/uwc.command.test.ts

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ describe("SlashCommand: uwc", () => {
9797
text: "Is this an Unwelcome Concept?",
9898
},
9999
answers: [
100-
{ text: "No, leave as is" },
101-
{ text: "No, but can be improved by change to achievement" },
102-
{ text: "Yes, demote" },
103-
{ text: "Yes, but can be salvaged by change to achievement" },
104-
{ text: "Need further discussion" },
100+
{ text: "Yes, demote" },
101+
{ text: "No, leave as is" },
102+
{ text: "No, transfer" },
103+
{ text: "Need further discussion" },
105104
],
106105
allowMultiselect: false,
107106
duration: 72,
@@ -188,11 +187,10 @@ describe("SlashCommand: uwc", () => {
188187
text: "Is this an Unwelcome Concept?",
189188
},
190189
answers: [
191-
{ text: "No, leave as is" },
192-
{ text: "No, but can be improved by change to achievement" },
193-
{ text: "Yes, demote" },
194-
{ text: "Yes, but can be salvaged by change to achievement" },
195-
{ text: "Need further discussion" },
190+
{ text: "Yes, demote" },
191+
{ text: "No, leave as is" },
192+
{ text: "No, transfer" },
193+
{ text: "Need further discussion" },
196194
],
197195
allowMultiselect: false,
198196
duration: 72,
@@ -230,11 +228,10 @@ describe("SlashCommand: uwc", () => {
230228
text: "Is this an Unwelcome Concept?",
231229
},
232230
answers: [
233-
{ text: "No, leave as is" },
234-
{ text: "No, but can be improved by change to achievement" },
235-
{ text: "Yes, demote" },
236-
{ text: "Yes, but can be salvaged by change to achievement" },
237-
{ text: "Need further discussion" },
231+
{ text: "Yes, demote" },
232+
{ text: "No, leave as is" },
233+
{ text: "No, transfer" },
234+
{ text: "Need further discussion" },
238235
],
239236
allowMultiselect: false,
240237
duration: 72,
@@ -296,11 +293,10 @@ describe("SlashCommand: uwc", () => {
296293
text: "Is this an Unwelcome Concept?",
297294
},
298295
answers: [
299-
{ text: "No, leave as is" },
300-
{ text: "No, but can be improved by change to achievement" },
301-
{ text: "Yes, demote" },
302-
{ text: "Yes, but can be salvaged by change to achievement" },
303-
{ text: "Need further discussion" },
296+
{ text: "Yes, demote" },
297+
{ text: "No, leave as is" },
298+
{ text: "No, transfer" },
299+
{ text: "Need further discussion" },
304300
],
305301
allowMultiselect: false,
306302
duration: 72, // 3 days in hours
@@ -333,7 +329,7 @@ describe("SlashCommand: uwc", () => {
333329
expect(callArgs.poll.allowMultiselect).toBe(false);
334330
});
335331

336-
it("creates a poll with exactly 5 answer options", async () => {
332+
it("creates a poll with exactly 4 answer options", async () => {
337333
// ARRANGE
338334
const member = createMockGuildMember({
339335
roles: {
@@ -354,7 +350,7 @@ describe("SlashCommand: uwc", () => {
354350

355351
// ASSERT
356352
const callArgs = (interaction.reply as any).mock.calls[0][0];
357-
expect(callArgs.poll.answers).toHaveLength(5);
353+
expect(callArgs.poll.answers).toHaveLength(4);
358354
});
359355
});
360356

src/slash-commands/uwc.command.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ const uwcSlashCommand: SlashCommand = {
6060
text: "Is this an Unwelcome Concept?",
6161
},
6262
answers: [
63-
{ text: "No, leave as is" },
64-
{ text: "No, but can be improved by change to achievement" },
6563
{ text: "Yes, demote" },
66-
{ text: "Yes, but can be salvaged by change to achievement" },
64+
{ text: "No, leave as is" },
65+
{ text: "No, transfer" },
6766
{ text: "Need further discussion" },
6867
],
6968
allowMultiselect: false,

0 commit comments

Comments
 (0)