Build a suggestion box: /suggest posts the idea in #suggestions as an embed with ๐ and ๐ reactions, and opens a thread on it for discussion
Suggestion Box lets members submit ideas that get posted with voting reactions and discussion threads.
Members:
/suggest idea: Your idea here โ submit a suggestionAdmins:
Each suggestion is posted as an embed with ๐ and ๐ reactions for voting, and a thread is automatically created for discussion.
Made by MEE6. Remix it to get a copy of your own and change anything you like.
Add a movie night channel where we vote on what to watch together
Create a dedicated channel for sharing pet photos
โ Your suggestion has been posted!
// Suggestion Box: post ideas with voting reactions and discussion threads
mee6.settings({
channel: {
type: 'channel',
label: 'Suggestions channel',
required: true,
sample: 'suggestions',
},
});
mee6.command(
'suggest',
{
description: 'Submit a suggestion',
options: [
{
name: 'idea',
type: 'string',
description: 'Your suggestion',
required: true,
},
],
},
async (ctx) => {
const idea = ctx.option<string>('idea');
const channelId = ctx.settings.channel;
if (!channelId) {
await ctx.reply('โ ๏ธ No suggestions channel is set. An admin can configure one in the dashboard.');
return;
}
// Post the suggestion as an embed
const sent = await ctx.send(channelId, {
embed: {
title: '๐ก New Suggestion',
description: idea,
color: '#5865F2',
author: {
name: ctx.author.displayName,
icon_url: ctx.author.avatarUrl,
},
footer: {
text: `Suggested by ${ctx.author.username}`,
},
},
});
// Add voting reactions
await mee6.addReaction(sent.channelId, sent.messageId, '๐');
await mee6.addReaction(sent.channelId, sent.messageId, '๐');
// Create a discussion thread
const thread = await mee6.createThread(sent.channelId, `${ctx.author.displayName}'s suggestion`, {
messageId: sent.messageId,
});
await ctx.send(thread.threadId, '๐ฌ Discuss this suggestion here!');
await ctx.reply({ content: 'โ
Your suggestion has been posted!', ephemeral: true });
}
);