mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
use proper constants for contexts and types
This commit is contained in:
parent
6c1120a6ef
commit
ad5c680f86
25 changed files with 121 additions and 143 deletions
|
@ -6,43 +6,22 @@ const { editOrReply } = require("#utils/message");
|
|||
const { STATICS, STATIC_ASSETS } = require("#utils/statics");
|
||||
|
||||
const { Components } = require("detritus-client/lib/utils");
|
||||
const { InteractionCallbackTypes, MessageComponentButtonStyles, ApplicationCommandOptionTypes } = require("detritus-client/lib/constants");
|
||||
const { InteractionCallbackTypes, MessageComponentButtonStyles, ApplicationCommandOptionTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
|
||||
const onlyEmoji = require('emoji-aware').onlyEmoji;
|
||||
|
||||
function toCodePoint(unicodeSurrogates, sep) {
|
||||
var
|
||||
r = [],
|
||||
c = 0,
|
||||
p = 0,
|
||||
i = 0;
|
||||
while (i < unicodeSurrogates.length) {
|
||||
c = unicodeSurrogates.charCodeAt(i++);
|
||||
if (p) {
|
||||
r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16));
|
||||
p = 0;
|
||||
} else if (0xD800 <= c && c <= 0xDBFF) {
|
||||
p = c;
|
||||
} else {
|
||||
r.push(c.toString(16));
|
||||
}
|
||||
}
|
||||
return r.join(sep || '-');
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'emojipedia',
|
||||
description: 'Shows detailed information about an emoji.',
|
||||
contexts: [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
InteractionContextTypes.GUILD,
|
||||
InteractionContextTypes.PRIVATE_CHANNEL,
|
||||
InteractionContextTypes.BOT_DM
|
||||
],
|
||||
integrationTypes: [
|
||||
1
|
||||
ApplicationIntegrationTypes.USER_INSTALL
|
||||
],
|
||||
options: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue