Ändern Sie den Präfix für die Zwietracht bot in javascript

Mache ich ein bot und wollen einen Präfix zum aufrufen der bot. Es funktioniert, um zu ändern, wenn Sie nicht Gruppen. Aber wie ändere ich das Präfix "!" wenn ich mit Gruppen?

Mein main-code

const commando = require('discord.js-commando');
const bot = new commando.Client();
const prefix = ":D";

bot.registry.registerGroup('random', 'Random');
bot.registry.registerCommandsIn(__dirname + "/commands");

bot.login('Botcode'
);

Meiner Gruppe

const commando = require('discord.js-commando');

class DiceRollCommand extends commando.Command {
  constructor(client) {
    super(client, {
      name: 'roll', 
      group: 'random',
      memberName: 'roll',
      description: 'Roll a die'
    });
  }

  async run(message, args){
    var roll = Math.floor(Math.random() * 6) + 1;
    message.reply("You rolled a " + roll);
  }
}

module.exports = DiceRollCommand;
InformationsquelleAutor user67318 | 2017-04-17
Schreibe einen Kommentar