/[sudobot]/trunk/src/emoji.js
ViewVC logotype

Contents of /trunk/src/emoji.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (show annotations)
Mon Jul 29 17:28:16 2024 UTC (8 months ago) by rakin
File MIME type: text/javascript
File size: 438 byte(s)
Added -send command and added support of attachments in snippets
1 async function getGuild() {
2 const guild_id = app.config.props.global.id;
3
4 try {
5 return await app.client.guilds.fetch(guild_id);
6 }
7 catch(e) {
8 return null;
9 }
10 }
11
12 async function find(cb) {
13 const guild = await getGuild();
14 return await guild.emojis.cache.find(cb);
15 }
16
17 async function emoji(name) {
18 return await find(e => e.name === name);
19 }
20
21 module.exports = {
22 getGuild,
23 find,
24 emoji
25 };

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26