Skip to content

Commit

Permalink
feat(results): stop removing results button
Browse files Browse the repository at this point in the history
  • Loading branch information
mezotv committed Apr 7, 2024
1 parent 77d4111 commit c95e3ee
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "would-you",
"version": "1.4.12",
"version": "1.4.13",
"description": "Would you rather die or use this bot. You got the choice",
"main": "dist/cluster.js",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions src/buttons/gamesActivities/dare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const button: Button = {
name: "dare",
execute: async (interaction: any, client, guildDb) => {
if (interaction.guild) {
await interaction.message.edit({ components: [] });
await interaction.message.edit({
components: [],
});
if (interaction.channel.isThread()) {
if (
!interaction.channel
Expand Down Expand Up @@ -46,7 +48,9 @@ const button: Button = {
}
}

const userDb = await UserModel.findOne({ userID: interaction.user?.id }) as IUserModel;
const userDb = (await UserModel.findOne({
userID: interaction.user?.id,
})) as IUserModel;

let Dare = await getDare(
guildDb?.language != null ? guildDb.language : userDb.language,
Expand Down
8 changes: 6 additions & 2 deletions src/buttons/gamesActivities/higherlower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const button: Button = {
name: "higherlower",
execute: async (interaction: any, client, guildDb) => {
if (interaction.guild) {
await interaction.message.edit({ components: [] });
await interaction.message.edit({
components: [],
});
if (interaction.channel.isThread()) {
if (
!interaction.channel
Expand Down Expand Up @@ -50,7 +52,9 @@ const button: Button = {
}
await interaction.deferReply();

const userDb = await UserModel.findOne({ userID: interaction.user?.id }) as IUserModel;
const userDb = (await UserModel.findOne({
userID: interaction.user?.id,
})) as IUserModel;

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

Expand Down
6 changes: 4 additions & 2 deletions src/buttons/gamesActivities/neverhaveiever.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const button: Button = {
name: "neverhaveiever",
execute: async (interaction: any, client, guildDb) => {
if (interaction.guild) {
await interaction.message.edit({ components: [] });
await interaction.message.edit({ components: [interaction.message.components[0]] });
if (interaction.channel.isThread()) {
if (
!interaction.channel
Expand Down Expand Up @@ -45,7 +45,9 @@ const button: Button = {
}
}

const userDb = await UserModel.findOne({ userID: interaction.user?.id }) as IUserModel;
const userDb = (await UserModel.findOne({
userID: interaction.user?.id,
})) as IUserModel;

let { Funny, Basic, Young, Food, RuleBreak } = await getNeverHaveIEver(
guildDb?.language != null ? guildDb.language : userDb.language,
Expand Down
4 changes: 3 additions & 1 deletion src/buttons/gamesActivities/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const button: Button = {
name: "random",
execute: async (interaction: any, client, guildDb) => {
if (interaction.guild) {
await interaction.message.edit({ components: [] });
await interaction.message.edit({
components: [],
});
if (interaction.channel.isThread()) {
if (
!interaction.channel
Expand Down
4 changes: 3 additions & 1 deletion src/buttons/gamesActivities/truth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const button: Button = {
name: "truth",
execute: async (interaction: any, client, guildDb) => {
if (interaction.guild) {
await interaction.message.edit({ components: [] });
await interaction.message.edit({
components: [],
});
if (interaction.channel.isThread()) {
if (
!interaction.channel
Expand Down
2 changes: 1 addition & 1 deletion src/buttons/gamesActivities/wouldyourather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const button: Button = {
name: "wouldyourather",
execute: async (interaction: any, client, guildDb) => {
if (interaction.guild) {
await interaction.message.edit({ components: [] });
await interaction.message.edit({ components: [interaction.message.components[0]] });
if (interaction.channel.isThread()) {
if (
!interaction.channel
Expand Down

0 comments on commit c95e3ee

Please sign in to comment.