Skip to content

Commit

Permalink
🐛 Fix invite command
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed May 14, 2021
1 parent 3af440c commit 2e1097a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
async supportLink(client){
const guild = client.guilds.cache.get(client.config.support.id);
const member = guild.me;
const channel = guild.channels.cache.find((ch) => ch.permissionsFor(member.id).has("CREATE_INSTANT_INVITE"));
const channel = guild.channels.cache.find((ch) => ch.permissionsFor(member.id).has("CREATE_INSTANT_INVITE") && ch.type === "text" || ch.type === "voice");
if(channel){
const invite = await channel.createInvite({ maxAge: 0 }).catch(() => {});
return invite ? invite.url : null;
Expand Down

0 comments on commit 2e1097a

Please sign in to comment.