feat: Enum resolvers & internal enum string removal (#7290)

Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
Suneet Tipirneni
2022-01-19 08:11:10 -05:00
committed by GitHub
parent 164589c551
commit 213acd7997
46 changed files with 696 additions and 547 deletions

View File

@@ -1,6 +1,7 @@
'use strict';
const assert = require('node:assert');
const { ChannelType } = require('discord-api-types/v9');
const { token } = require('./auth');
const { Client, Intents } = require('../src');
@@ -10,7 +11,7 @@ client.on('ready', async () => {
try {
const guild = await client.guilds.create('testing', {
channels: [
{ name: 'afk channel', type: 'GUILD_VOICE', id: 0 },
{ name: 'afk channel', type: ChannelType.GuildVoice, id: 0 },
{ name: 'system-channel', id: 1 },
],
afkChannelId: 0,

View File

@@ -6,6 +6,7 @@ const request = require('superagent');
const ytdl = require('ytdl-core');
const { token, song } = require('./auth.js');
const { Client, Intents } = require('../src');
const { ChannelType } = require('discord-api-types/v9');
console.time('magic');
@@ -57,7 +58,7 @@ client.on('messageCreate', message => {
if (true) {
if (message.content === 'makechann') {
if (message.channel.guild) {
message.channel.guild.channels.create('hi', { type: 'GUILD_TEXT' }).then(console.log);
message.channel.guild.channels.create('hi', { type: ChannelType.GuildText }).then(console.log);
}
}