Skip to content

Commit

Permalink
[PATCH] bad perm checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso committed Dec 31, 2023
1 parent cebda7c commit 1b0824f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "module",
"version": "2.0.24",
"version": "2.0.25",
"scripts": {
"start": "node --max-old-space-size=8192 ./dist/index.js",
"build": "npx tsc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const canEditMember = (
if (member.guild.ownerId === me.id) return true;

switch (true) {
case body.channel_id !== member.voice.channelId: {
case 'channel_id' in body && body.channel_id !== member.voice.channelId: {
if (!body.channel_id) return me.permissions.has(Discord.PermissionFlagsBits.MoveMembers);

return me.permissionsIn(body.channel_id).has(Discord.PermissionFlagsBits.Connect);
Expand Down

0 comments on commit 1b0824f

Please sign in to comment.