Skip to content

Commit

Permalink
(#52) Only use text channels for welcome/goodbye
Browse files Browse the repository at this point in the history
  • Loading branch information
mkevenaar committed May 29, 2022
1 parent 57cc78b commit f8c8492
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/commands/admin/goodbye.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export async function execute(interaction, client) {
}

if (!!channel?.id) {
if(channel.type !== 'GUILD_TEXT') {
return await interaction.reply({ content: 'Only text channels are allowed', ephemeral: true });
}
data.addons.goodbye.channel = channel.id;
data.markModified('addons.goodbye');
await data.save();
Expand Down
3 changes: 3 additions & 0 deletions src/commands/admin/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export async function execute(interaction, client) {
}

if (!!channel?.id) {
if(channel.type !== 'GUILD_TEXT') {
return await interaction.reply({ content: 'Only text channels are allowed', ephemeral: true });
}
data.addons.welcome.channel = channel.id;
data.markModified('addons.welcome');
await data.save();
Expand Down

0 comments on commit f8c8492

Please sign in to comment.