针对漫游器的自动备份

时间:2020-07-30 16:07:46

标签: node.js discord discord.js

我正在制作一个不和谐的备份机器人,有什么办法可以使每个公会自动运行? 还有一种方法可以向dm中的用户发送已备份的公会

if(command === "backup"){
        // Check member permissions
        if(!message.member.hasPermission("ADMINISTRATOR")){
            return message.channel.send(":x: | You must be an administrator of this server to request a backup!");
        }
        // Create the backup
        backup.create(message.guild, {
            jsonBeautify: true
        }).then((backupData) => {
            // And send informations to the backup owner
            message.author.send("The backup has been created! To load it, type this command on the server of your choice: `"+settings.prefix+"load "+backupData.id+"` Do not share this code as it contains all of the data from the server");
            message.channel.send(":white_check_mark: Backup successfully created. The backup ID was sent in dm!");
        });

0 个答案:

没有答案