mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 05:51:42 +02:00
Fix Starboard
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ client.on('messageReactionAdd', (reaction, user) => {
|
|||||||
if (reaction.emoji.name !== '⭐') return;
|
if (reaction.emoji.name !== '⭐') return;
|
||||||
if (reaction.count > 1) return;
|
if (reaction.count > 1) return;
|
||||||
const msg = reaction.message;
|
const msg = reaction.message;
|
||||||
const channel = msg.guild.settings.get('starboard');
|
const channel = msg.guild.channels.get(msg.guild.settings.get('starboard'));
|
||||||
if (!channel) return;
|
if (!channel) return;
|
||||||
if (user.id === msg.author.id) {
|
if (user.id === msg.author.id) {
|
||||||
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES'))
|
if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES'))
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ module.exports = class StarCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, args, reaction) {
|
async run(msg, args, reaction) {
|
||||||
const { id } = args;
|
const { id } = args;
|
||||||
const channel = msg.guild.settings.get('starboard');
|
const channel = msg.guild.channels.get(msg.guild.settings.get('starboard'));
|
||||||
if (!channel || !channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return null;
|
if (!channel || !channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return null;
|
||||||
try {
|
try {
|
||||||
const message = await msg.channel.fetchMessage(id);
|
const message = await msg.channel.fetchMessage(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user