mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:26:21 +02:00
Bug fixes
This commit is contained in:
@@ -16,7 +16,8 @@ module.exports = class ServerInfoCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
async run(msg) {
|
||||
if (!msg.guild.members.has(msg.guild.ownerID)) await msg.guild.members.fetch(msg.guild.ownerID);
|
||||
const embed = new MessageEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.setThumbnail(msg.guild.iconURL())
|
||||
@@ -33,7 +34,7 @@ module.exports = class ServerInfoCommand extends Command {
|
||||
.addField('❯ Verification Level',
|
||||
verificationLevels[msg.guild.verificationLevel], true)
|
||||
.addField('❯ Owner',
|
||||
msg.guild.owner ? msg.guild.owner.user.tag : 'None', true)
|
||||
msg.guild.owner.user.tag, true)
|
||||
.addField('❯ Members',
|
||||
msg.guild.memberCount, true)
|
||||
.addField('❯ Roles',
|
||||
|
||||
@@ -33,6 +33,8 @@ module.exports = class Base64Command extends Command {
|
||||
}
|
||||
|
||||
run(msg, { mode, text }) {
|
||||
return msg.say(base64(text, mode));
|
||||
const converted = base64(text, mode);
|
||||
if (!converted) return msg.reply('That is not valid Base64.');
|
||||
return msg.say(converted);
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "71.0.1",
|
||||
"version": "71.0.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class Util {
|
||||
|
||||
static base64(text, mode = 'encode') {
|
||||
if (mode === 'encode') return Buffer.from(text).toString('base64');
|
||||
if (mode === 'decode') return Buffer.from(text, 'base64').toString('utf8');
|
||||
if (mode === 'decode') return Buffer.from(text, 'base64').toString('utf8') || null;
|
||||
throw new TypeError(`${mode} is not a supported base64 mode.`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user