mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 04:45:02 +00:00
Update to discord.js v13.8.0, adding support for text-in-voice
This commit is contained in:
parent
ba78103807
commit
b05fbe1d04
32 changed files with 151 additions and 149 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Channel, Message, NewsChannel, TextChannel, ThreadChannel } from "discord.js";
|
||||
import { Channel, GuildTextBasedChannel, Message, NewsChannel, TextChannel, ThreadChannel } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
|
@ -20,7 +20,7 @@ const MAX_REPEAT_UNTIL = moment.utc().add(100, "years");
|
|||
export async function actualPostCmd(
|
||||
pluginData: GuildPluginData<PostPluginType>,
|
||||
msg: Message,
|
||||
targetChannel: Channel,
|
||||
targetChannel: GuildTextBasedChannel,
|
||||
content: StrictMessageContent,
|
||||
opts: {
|
||||
"enable-mentions"?: boolean;
|
||||
|
@ -30,12 +30,8 @@ export async function actualPostCmd(
|
|||
"repeat-times"?: number;
|
||||
} = {},
|
||||
) {
|
||||
if (
|
||||
!(targetChannel instanceof TextChannel) &&
|
||||
!(targetChannel instanceof NewsChannel) &&
|
||||
!(targetChannel instanceof ThreadChannel)
|
||||
) {
|
||||
msg.channel.send(errorMessage("Specified channel is not a text channel, announcement channel, or thread"));
|
||||
if (!targetChannel.isText()) {
|
||||
msg.channel.send(errorMessage("Specified channel is not a text-based channel"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
import { Message, MessageAttachment, MessageOptions, NewsChannel, TextChannel, ThreadChannel } from "discord.js";
|
||||
import {
|
||||
GuildTextBasedChannel,
|
||||
Message,
|
||||
MessageAttachment,
|
||||
MessageOptions,
|
||||
NewsChannel,
|
||||
TextChannel,
|
||||
ThreadChannel,
|
||||
} from "discord.js";
|
||||
import fs from "fs";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { downloadFile } from "../../../utils";
|
||||
|
@ -9,7 +17,7 @@ const fsp = fs.promises;
|
|||
|
||||
export async function postMessage(
|
||||
pluginData: GuildPluginData<PostPluginType>,
|
||||
channel: TextChannel | NewsChannel | ThreadChannel,
|
||||
channel: GuildTextBasedChannel,
|
||||
content: MessageOptions,
|
||||
attachments: MessageAttachment[] = [],
|
||||
enableMentions: boolean = false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue