updated builds

This commit is contained in:
2022-02-07 14:38:55 -06:00
parent cf453957e9
commit 81ea71328a
2 changed files with 14 additions and 9 deletions

11
dist/discord.js vendored
View File

@@ -7,13 +7,12 @@ const v9_1 = require("discord-api-types/v9");
const commands = [ const commands = [
{ {
name: 'queue', name: 'queue',
description: 'create a queue', description: 'get queue info or initialize a queue for this channel',
options: [ options: [
{ {
type: 4, type: 4,
name: 'teamsize', name: 'teamsize',
description: 'size of each team', description: 'size of each team',
required: true,
min_value: 1 min_value: 1
} }
] ]
@@ -27,12 +26,8 @@ const commands = [
description: 'leave the active queue' description: 'leave the active queue'
}, },
{ {
name: 'ready', name: 'stop',
description: 'ready the queue and display team info' description: 'stops the current queue (must have the Manage Messages permission)'
},
{
name: 'cancel',
description: 'cancels the current queue (must have the Manage Messages permission)'
}, },
{ {
name: 'player', name: 'player',

12
dist/util.js vendored
View File

@@ -1,6 +1,6 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getChannel = exports.getMember = exports.emsg = exports.errorMessage = exports.shuffle = void 0; exports.memberIsModThrow = exports.memberIsMod = exports.getChannel = exports.getMember = exports.emsg = exports.errorMessage = exports.shuffle = void 0;
const discord_js_1 = require("discord.js"); const discord_js_1 = require("discord.js");
/** /**
* shuffles an array * shuffles an array
@@ -64,3 +64,13 @@ function getChannel(interaction) {
return channel; return channel;
} }
exports.getChannel = getChannel; exports.getChannel = getChannel;
function memberIsMod(interaction) {
let member = getMember(interaction);
return member.permissionsIn(interaction.channelId).has('MANAGE_MESSAGES');
}
exports.memberIsMod = memberIsMod;
function memberIsModThrow(interaction) {
if (!memberIsMod(interaction))
throw (0, exports.emsg)('Member is not a moderator');
}
exports.memberIsModThrow = memberIsModThrow;