mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-07 16:05:01 +00:00
Finish preliminary rework, ready to test
This commit is contained in:
parent
57893e7f76
commit
d0a1beb809
177 changed files with 854 additions and 707 deletions
|
@ -3,6 +3,7 @@ import { CustomEventsPluginType } from "../types";
|
|||
import * as t from "io-ts";
|
||||
import { renderTemplate } from "../../../templateFormatter";
|
||||
import { ActionError } from "../ActionError";
|
||||
import { TextChannel } from "discord.js";
|
||||
|
||||
export const MessageAction = t.type({
|
||||
type: t.literal("message"),
|
||||
|
@ -21,5 +22,5 @@ export async function messageAction(
|
|||
if (!targetChannel) throw new ActionError("Unknown target channel");
|
||||
if (!(targetChannel instanceof TextChannel)) throw new ActionError("Target channel is not a text channel");
|
||||
|
||||
await targetChannel.createMessage({ content: action.content });
|
||||
await targetChannel.send({ content: action.content });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue