Skip to content

Conversation

@KoTenshi
Copy link
Contributor

@KoTenshi KoTenshi commented Oct 6, 2023

No description provided.

@KoTenshi KoTenshi linked an issue Oct 6, 2023 that may be closed by this pull request
@KoTenshi KoTenshi requested a review from johan-t October 6, 2023 17:56
if (!guild) throw new Error('Guild not found');

(guild.channels.cache.get("1135557183845711983") as TextChannel).send({ components: [actionRow] }); // Channel Id for #How-to-basics
(guild.channels.cache.get("1135557183845711983") as TextChannel).send({ components: [actionRow] }); // Channel Id for #How-to-basics; main sever: 1135557183845711983; test sever: 1159905209414332526
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(guild.channels.cache.get("1135557183845711983") as TextChannel).send({ components: [actionRow] }); // Channel Id for #How-to-basics; main sever: 1135557183845711983; test sever: 1159905209414332526
(guild.channels.cache.get("1135557183845711983") as TextChannel).send({ components: [actionRow] }); // Channel Id for #How-to-basics; main server: 1135557183845711983; test server: 1159905209414332526

{ question: 'Unternehmen sollen selbst entscheiden, ob sie ihren Beschäftigten das Arbeiten im Homeoffice erlauben.', tag: ['Arbeitsrecht', 'Digitalisierung'] },
];

const specificQuestionMessage = {} as { [key: string]: any}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this object is only stored in heap. therefore, it'd reset every time the bot re-deploys

sendQuestion(interaction);
};

export { specificQuestionMessage }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw use individual exports instead of putting all exports at the end of the file

@greg6775
Copy link
Member

greg6775 commented Oct 6, 2023

interesting approach. however, we could just keep editing the bot's initial message and then hide the buttons after the last question has been answered

this way we could solve this issue and also prevent the dm history from being so cluttered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it impossible to react to old question

3 participants