Start move to d.js
This commit is contained in:
parent
a9e0466e33
commit
9fc045cd38
17 changed files with 339 additions and 6317 deletions
|
@ -1,7 +1,7 @@
|
|||
import { disableInlineCode, isSnowflake } from "../utils";
|
||||
import { getChannelIdFromMessageId } from "../data/getChannelIdFromMessageId";
|
||||
import { GuildPluginData, TypeConversionError } from "knub";
|
||||
import { TextChannel } from "eris";
|
||||
import { TextChannel } from "discord.js";
|
||||
|
||||
const channelAndMessageIdRegex = /^(\d+)[\-\/](\d+)$/;
|
||||
const messageLinkRegex = /^https:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/\d+\/(\d+)\/(\d+)$/i;
|
||||
|
@ -46,7 +46,7 @@ export async function resolveMessageTarget(pluginData: GuildPluginData<any>, val
|
|||
return null;
|
||||
}
|
||||
|
||||
const channel = pluginData.guild.channels.get(result.channelId);
|
||||
const channel = pluginData.guild.channels.resolve(result.channelId);
|
||||
if (!channel || !(channel instanceof TextChannel)) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue