Skip to content

Commit c95e3ee

Browse files
author
Dominik K
committed
feat(results): stop removing results button
1 parent 77d4111 commit c95e3ee

File tree

7 files changed

+24
-10
lines changed

7 files changed

+24
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "would-you",
3-
"version": "1.4.12",
3+
"version": "1.4.13",
44
"description": "Would you rather die or use this bot. You got the choice",
55
"main": "dist/cluster.js",
66
"scripts": {

src/buttons/gamesActivities/dare.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const button: Button = {
1818
name: "dare",
1919
execute: async (interaction: any, client, guildDb) => {
2020
if (interaction.guild) {
21-
await interaction.message.edit({ components: [] });
21+
await interaction.message.edit({
22+
components: [],
23+
});
2224
if (interaction.channel.isThread()) {
2325
if (
2426
!interaction.channel
@@ -46,7 +48,9 @@ const button: Button = {
4648
}
4749
}
4850

49-
const userDb = await UserModel.findOne({ userID: interaction.user?.id }) as IUserModel;
51+
const userDb = (await UserModel.findOne({
52+
userID: interaction.user?.id,
53+
})) as IUserModel;
5054

5155
let Dare = await getDare(
5256
guildDb?.language != null ? guildDb.language : userDb.language,

src/buttons/gamesActivities/higherlower.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const button: Button = {
2121
name: "higherlower",
2222
execute: async (interaction: any, client, guildDb) => {
2323
if (interaction.guild) {
24-
await interaction.message.edit({ components: [] });
24+
await interaction.message.edit({
25+
components: [],
26+
});
2527
if (interaction.channel.isThread()) {
2628
if (
2729
!interaction.channel
@@ -50,7 +52,9 @@ const button: Button = {
5052
}
5153
await interaction.deferReply();
5254

53-
const userDb = await UserModel.findOne({ userID: interaction.user?.id }) as IUserModel;
55+
const userDb = (await UserModel.findOne({
56+
userID: interaction.user?.id,
57+
})) as IUserModel;
5458

5559
const initembed = new HigherLowerEmbed(interaction, client, guildDb);
5660

src/buttons/gamesActivities/neverhaveiever.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const button: Button = {
1717
name: "neverhaveiever",
1818
execute: async (interaction: any, client, guildDb) => {
1919
if (interaction.guild) {
20-
await interaction.message.edit({ components: [] });
20+
await interaction.message.edit({ components: [interaction.message.components[0]] });
2121
if (interaction.channel.isThread()) {
2222
if (
2323
!interaction.channel
@@ -45,7 +45,9 @@ const button: Button = {
4545
}
4646
}
4747

48-
const userDb = await UserModel.findOne({ userID: interaction.user?.id }) as IUserModel;
48+
const userDb = (await UserModel.findOne({
49+
userID: interaction.user?.id,
50+
})) as IUserModel;
4951

5052
let { Funny, Basic, Young, Food, RuleBreak } = await getNeverHaveIEver(
5153
guildDb?.language != null ? guildDb.language : userDb.language,

src/buttons/gamesActivities/random.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const button: Button = {
1616
name: "random",
1717
execute: async (interaction: any, client, guildDb) => {
1818
if (interaction.guild) {
19-
await interaction.message.edit({ components: [] });
19+
await interaction.message.edit({
20+
components: [],
21+
});
2022
if (interaction.channel.isThread()) {
2123
if (
2224
!interaction.channel

src/buttons/gamesActivities/truth.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const button: Button = {
1616
name: "truth",
1717
execute: async (interaction: any, client, guildDb) => {
1818
if (interaction.guild) {
19-
await interaction.message.edit({ components: [] });
19+
await interaction.message.edit({
20+
components: [],
21+
});
2022
if (interaction.channel.isThread()) {
2123
if (
2224
!interaction.channel

src/buttons/gamesActivities/wouldyourather.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const button: Button = {
1616
name: "wouldyourather",
1717
execute: async (interaction: any, client, guildDb) => {
1818
if (interaction.guild) {
19-
await interaction.message.edit({ components: [] });
19+
await interaction.message.edit({ components: [interaction.message.components[0]] });
2020
if (interaction.channel.isThread()) {
2121
if (
2222
!interaction.channel

0 commit comments

Comments
 (0)