mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Allow airhorn and dec-talk to work without reaction perms
This commit is contained in:
@@ -15,7 +15,6 @@ module.exports = class AirhornCommand extends Command {
|
||||
duration: 10
|
||||
},
|
||||
userPermissions: ['CONNECT', 'SPEAK'],
|
||||
clientPermissions: ['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
|
||||
credit: [
|
||||
{
|
||||
name: 'Discord',
|
||||
@@ -35,7 +34,9 @@ module.exports = class AirhornCommand extends Command {
|
||||
}
|
||||
const airhorn = sounds[Math.floor(Math.random() * sounds.length)];
|
||||
connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'airhorn', airhorn));
|
||||
await msg.react('🔉');
|
||||
if (msg.channel.permissionsFor(this.client.user).has(['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'])) {
|
||||
await msg.react('🔉');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,6 @@ module.exports = class DECTalkCommand extends Command {
|
||||
duration: 10
|
||||
},
|
||||
userPermissions: ['CONNECT', 'SPEAK'],
|
||||
clientPermissions: ['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
|
||||
credit: [
|
||||
{
|
||||
name: 'calzoneman',
|
||||
@@ -57,7 +56,9 @@ module.exports = class DECTalkCommand extends Command {
|
||||
.get('http://tts.cyzon.us/tts')
|
||||
.query({ text });
|
||||
connection.play(url);
|
||||
await msg.react('🔉');
|
||||
if (msg.channel.permissionsFor(this.client.user).has(['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'])) {
|
||||
await msg.react('🔉');
|
||||
}
|
||||
return null;
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "114.5.4",
|
||||
"version": "114.5.5",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user