mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 23:25:02 +00:00
Type fixes for djs
This commit is contained in:
parent
653d6c1dc2
commit
0822fc15e5
130 changed files with 8877 additions and 411 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Message } from "discord.js";
|
||||
import { Message, Snowflake } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { isDiscordRESTError } from "../../../utils";
|
||||
|
@ -23,7 +23,7 @@ export const ClearReactionRolesCmd = reactionRolesCmd({
|
|||
|
||||
let targetMessage: Message;
|
||||
try {
|
||||
targetMessage = await args.message.channel.messages.fetch(args.message.messageId);
|
||||
targetMessage = await args.message.channel.messages.fetch(args.message.messageId as Snowflake);
|
||||
} catch (err) {
|
||||
if (isDiscordRESTError(err) && err.code === 50001) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Missing access to the specified message");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue