summaryrefslogtreecommitdiff
path: root/src/commands/moderation/addrole.ts
blob: 015775b590a6d96a652b5d12cda5d34113bb310d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
//@ts-ignore this has no types
import emoji from 'emoji-random'

module.exports = class AddRoleModeration extends Command {
    constructor(client: CommandoClient) {
        super(client, {
            name: 'addrole',
            aliases: ['roleadd'],
            group: 'moderation',
            memberName: 'addrole',
            description: '**[Disabled]** Adds a role to a specific user.',
            // args: [
            //     {
            //         key: 'userID',
            //         prompt: 'Who would you like to add the role to? (@someone or myself)',
            //         type: 'string'
            //     },
            //     {
            //         key: 'roleID',
            //         prompt: 'What role would you like to add?',
            //         type: 'string'
            //     }
            // ],
            userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'],
            clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'],
            examples: [
                'uwu!addrole @CoolRole',
                'uwu!addrole @sin#1337 @CoolRole',
                'uwu!roleadd @sin#1337',
                'uwu!roleadd @sin#1337 @CoolerRole'
            ],
            throttling: {
                usages: 5,
                duration: 30
            },
            guildOnly: true
        });
    }
    run(msg: CommandoMessage, { userID, roleID }: any) {
        return msg.reply(`Command disabled. ${emoji.random()}`)
        // let role = roleID
        // console.log('role:', role)
        // let member = userID
        // console.log('member:', member)
        // if (role) {
        //     if (msg.guild.member(member)?.roles.cache.some(role)) {
        //         msg.reply(member + ' already has that role! ' + emoji.random())
        //     } else {
        //         msg.guild.member(member)?.roles.add(role).catch(err => console.log(err))
        //         msg.reply(`The role **${role}** has been added to **${userID}**.`)
        //     }
        // } else {
        //     msg.reply('The role or user is either non-existant or you might\'ve mispelled it.')
        // }
    }
};