mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Change DiscordRESTError to DiscordAPIError
This commit is contained in:
parent
be71357ff9
commit
1ad70ffe1a
18 changed files with 50 additions and 50 deletions
|
@ -2,7 +2,7 @@ import { GuildChannel, Permissions, Snowflake, TextChannel } from "discord.js";
|
|||
import { GuildPluginData } from "knub";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { logger } from "../../../logger";
|
||||
import { isDiscordRESTError, stripObjectToScalars, UnknownUser } from "../../../utils";
|
||||
import { isDiscordAPIError, stripObjectToScalars, UnknownUser } from "../../../utils";
|
||||
import { SlowmodePluginType } from "../types";
|
||||
|
||||
export async function applyBotSlowmodeToUserId(
|
||||
|
@ -24,7 +24,7 @@ export async function applyBotSlowmodeToUserId(
|
|||
} catch (e) {
|
||||
const user = pluginData.client.users.fetch(userId as Snowflake) || new UnknownUser({ id: userId });
|
||||
|
||||
if (isDiscordRESTError(e) && e.code === 50013) {
|
||||
if (isDiscordAPIError(e) && e.code === 50013) {
|
||||
logger.warn(
|
||||
`Missing permissions to apply bot slowmode to user ${userId} on channel ${channel.name} (${channel.id}) on server ${pluginData.guild.name} (${pluginData.guild.id})`,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue