/[sudobot]/trunk/queues/send.js
ViewVC logotype

Annotation of /trunk/queues/send.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 45 - (hide annotations)
Mon Jul 29 17:28:20 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: text/javascript
File size: 375 byte(s)
Release version 1.8.0

* Added setTimeout() and DB combination support so that the timeouts would never get lost even if the bot stops
* Added messages scheduling, expiring and both in one support
1 rakin 45 async function send(content, channel_id, guild_id) {
2     console.log(channel_id, guild_id);
3     const guild = await app.client.guilds.cache.get(guild_id);
4    
5     if (guild) {
6     const channel = await guild.channels.fetch(channel_id);
7    
8     if (channel) {
9     await channel.send({
10     content
11     });
12     }
13     }
14     }
15    
16     module.exports = send;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26