/[sudobot]/trunk/src/queues/send.ts
ViewVC logotype

Annotation of /trunk/src/queues/send.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 51 - (hide annotations)
Mon Jul 29 17:28:23 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 512 byte(s)
Release version 2.0
1 rakin 51 import { TextChannel } from "discord.js";
2     import DiscordClient from "../client/Client";
3    
4     export default async function send(client: DiscordClient, content: string, channel_id: string, guild_id: string) {
5     console.log(channel_id, guild_id);
6     const guild = await client.guilds.cache.get(guild_id);
7    
8     if (guild) {
9     const channel = <TextChannel> await guild.channels.fetch(channel_id);
10    
11     if (channel) {
12     await channel.send({
13     content
14     });
15     }
16     }
17     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26