Parent Directory
|
Revision Log
|
Patch
revision 26 by rakin, Mon Jul 29 17:28:16 2024 UTC | revision 30 by rakin, Mon Jul 29 17:28:17 2024 UTC | |
---|---|---|
# | Line 7 module.exports = { | Line 7 module.exports = { |
7 | this.notAFK(msg, data); | this.notAFK(msg, data); |
8 | } | } |
9 | else { | else { |
10 | this.AFK(msg); | this.AFK(msg, cm); |
11 | } | } |
12 | }); | }); |
13 | }, | }, |
# | Line 21 module.exports = { | Line 21 module.exports = { |
21 | }); | }); |
22 | }); | }); |
23 | }, | }, |
24 | async AFK(msg) { | async AFK(msg, cm) { |
25 | app.db.get('INSERT INTO afk(user_id, date, mentions) VALUES(?, ?, ?)', [msg.author.id, new Date().toISOString(), '0'], async (err) => { | app.db.get('INSERT INTO afk(user_id, date, mentions, reason) VALUES(?, ?, ?, ?)', [msg.author.id, new Date().toISOString(), '0', cm.args[0] === undefined ? '' : cm.args.join(' ')], async (err) => { |
26 | await msg.channel.send({ | await msg.channel.send({ |
27 | embeds: [ | embeds: [ |
28 | new MessageEmbed() | new MessageEmbed() |
29 | .setDescription('Your status has been updated to AFK.') | .setDescription('Your\'re AFK now.' + (cm.args[0] === undefined ? '' : ` Your status has been updated to: **${cm.args.join(' ').replace(/\*/g, '\\*')}**`)) |
30 | ] | ] |
31 | }); | }); |
32 | }); | }); |
|
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |