Restrict roles command to server admin

This commit is contained in:
Eduard Urbach 2018-07-11 01:06:34 +09:00
parent a48e1c8db1
commit 851a7c559c

View File

@ -9,9 +9,12 @@ import (
// Guild ID // Guild ID
const guildID = "134910939140063232" const guildID = "134910939140063232"
// Roles prints out all roles. // Admin ID
const adminID = "122970452632141826"
// Roles prints out all roles for the server admin.
func Roles(s *discordgo.Session, msg *discordgo.MessageCreate) bool { func Roles(s *discordgo.Session, msg *discordgo.MessageCreate) bool {
if msg.Content != "!roles" { if msg.Content != "!roles" || msg.Author.ID != adminID {
return false return false
} }