/[sudobot]/trunk/commands/unban.js
ViewVC logotype

Diff of /trunk/commands/unban.js

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

revision 5 by rakin, Mon Jul 29 17:28:11 2024 UTC revision 25 by rakin, Mon Jul 29 17:28:16 2024 UTC
# Line 1  Line 1 
1    const History = require("../src/History");
2  const MessageEmbed = require("../src/MessageEmbed");  const MessageEmbed = require("../src/MessageEmbed");
3    
4  module.exports = {  module.exports = {
# Line 15  module.exports = { Line 16  module.exports = {
16          }          }
17    
18          try {          try {
19              await msg.guild.members.unban(cm.args[0]);              await msg.guild.bans.remove(cm.args[0]);
20          }          }
21          catch(e) {          catch(e) {
22              console.log(e);              console.log(e);
# Line 24  module.exports = { Line 25  module.exports = {
25                  embeds: [                  embeds: [
26                      new MessageEmbed()                      new MessageEmbed()
27                      .setColor('#f14a60')                      .setColor('#f14a60')
28                      .setDescription(`Invalid user ID or missing permissions.`)                      .setDescription(`Invalid user ID or missing permissions or user not banned.`)
29                  ]                  ]
30              });              });
31    
32              return;              return;
33          }          }
34            
35            await History.create(cm.args[0], msg.guild, 'unban', msg.author.id, async (data2) => {
36                
37            });
38    
39          await msg.reply({          await msg.reply({
40              embeds: [              embeds: [

Legend:
Removed from v.5  
changed lines
  Added in v.25

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26