/[sudobot]/trunk/src/commands/utils/AFKCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/utils/AFKCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by rakin, Mon Jul 29 17:28:23 2024 UTC revision 77 by rakin, Mon Jul 29 17:28:30 2024 UTC
# Line 10  import { fetchEmoji } from '../../utils/ Line 10  import { fetchEmoji } from '../../utils/
10    
11  export async function notAFK(client: DiscordClient, msg: Message | CommandInteraction, data: any) {  export async function notAFK(client: DiscordClient, msg: Message | CommandInteraction, data: any) {
12      client.db.get('DELETE FROM afk WHERE user_id = ?', [msg.member!.user.id], async (err: any) => {      client.db.get('DELETE FROM afk WHERE user_id = ?', [msg.member!.user.id], async (err: any) => {
13          await msg.channel!.send({          await msg.reply({
14              embeds: [              embeds: [
15                  new MessageEmbed()                  new MessageEmbed()
16                  .setDescription('You\'re no longer AFK. You had **' + data.mentions + '** mentions in the servers where SudoBot is joined.')                  .setDescription('You\'re no longer AFK. You had **' + data.mentions + '** mentions in the servers where SudoBot is joined.')
# Line 30  export async function AFK(client: Discor Line 30  export async function AFK(client: Discor
30      }      }
31    
32      client.db.get('INSERT INTO afk(user_id, date, mentions, reason) VALUES(?, ?, ?, ?)', [msg.member!.user.id, new Date().toISOString(), '0', reason === undefined ? '' : reason], async (err: any) => {      client.db.get('INSERT INTO afk(user_id, date, mentions, reason) VALUES(?, ?, ?, ?)', [msg.member!.user.id, new Date().toISOString(), '0', reason === undefined ? '' : reason], async (err: any) => {
33          await msg.channel!.send({          await msg.reply({
34              embeds: [              embeds: [
35                  new MessageEmbed()                  new MessageEmbed()
36                  .setDescription('You\'re AFK now.' + (reason === undefined ? '' : ` Your status has been updated to: **${reason.replace(/\*/g, '\\*')}**`))                  .setDescription('You\'re AFK now.' + (reason === undefined ? '' : ` Your status has been updated to: **${reason.replace(/\*/g, '\\*')}**`))

Legend:
Removed from v.51  
changed lines
  Added in v.77

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26