Files
discordeno/plugins/helpers/src/sendTextMessage.ts
Skillz4Killz 14f44458f9 feat(plugins/helpers): add sendTextMessage to send a simple string (#2033)
* feat: sendTextMessage to send simple string

* fix: clean up imports

* Update plugins/helpers/mod.ts

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-02-11 17:14:49 +00:00

12 lines
304 B
TypeScript

import { Bot, CreateMessage } from "../deps.ts";
/** Sends a text message. */
export async function sendTextMessage(
bot: Bot,
channelId: bigint,
content: string | CreateMessage,
) {
if (typeof content === "string") content = { content };
return bot.helpers.sendMessage(channelId, content);
}