Downgrade to v13

[vi] cảm giác đau khổ
This commit is contained in:
March 7th
2022-03-24 17:55:32 +07:00
parent 9596b1a210
commit 7dfdef46a5
218 changed files with 8584 additions and 9108 deletions

View File

@@ -1,6 +1,5 @@
'use strict';
const { Routes } = require('discord-api-types/v9');
const BaseGuildTextChannel = require('./BaseGuildTextChannel');
const { Error } = require('../errors');
@@ -15,7 +14,7 @@ class NewsChannel extends BaseGuildTextChannel {
* @param {string} [reason] Reason for creating the webhook
* @returns {Promise<NewsChannel>}
* @example
* if (channel.type === ChannelType.GuildNews) {
* if (channel.type === 'GUILD_NEWS') {
* channel.addFollower('222197033908436994', 'Important announcements')
* .then(() => console.log('Added follower'))
* .catch(console.error);
@@ -24,7 +23,7 @@ class NewsChannel extends BaseGuildTextChannel {
async addFollower(channel, reason) {
const channelId = this.guild.channels.resolveId(channel);
if (!channelId) throw new Error('GUILD_CHANNEL_RESOLVE');
await this.client.api.channels(this.id).followers.post({ body: { webhook_channel_id: channelId }, reason });
await this.client.api.channels(this.id).followers.post({ data: { webhook_channel_id: channelId }, reason });
return this;
}
}