-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7ba645
commit 3bb0fb1
Showing
3 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const Discord = require("discord.js"); | ||
const fs = require("fs"); | ||
|
||
module.exports = async (reaction, user) => { | ||
// if (!reaction.message.guild.members.get(user.id).permissions.has("MANAGE_GUILD")) return; | ||
if (user.id != '332424370272337923') return; | ||
if (reaction.emoji.name != "⭐") return; | ||
let star = JSON.parse(fs.readFileSync("./assets/g.json", "utf8")); | ||
if (!reaction.message.guild.id in star) return reaction.message.channel.send("You haven\'t set starboard channel yet!"); | ||
let msg; | ||
|
||
if (reaction.message.partial) { | ||
try { | ||
msg = await reaction.message.fetch(); | ||
} catch (e) { | ||
console.log(e); | ||
} | ||
} | ||
msg = reaction.message; | ||
reaction.message.guild.channels.get(star[reaction.message.guild.id]).send(msg); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters