|
|
|
@ -9,14 +9,13 @@ import (
@@ -9,14 +9,13 @@ import (
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
|
token string |
|
|
|
|
configFile string |
|
|
|
|
dg *discordgo.Session |
|
|
|
|
guild = "451553644161138712" |
|
|
|
|
guild string |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
func init() { |
|
|
|
|
flag.StringVar(&token, "t", "", "Bot Token") |
|
|
|
|
flag.StringVar(&configFile, "c", "", "Config file") |
|
|
|
|
flag.StringVar(&guild, "g", "", "Guild ID") |
|
|
|
|
flag.Parse() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -26,11 +25,11 @@ func main() {
@@ -26,11 +25,11 @@ func main() {
|
|
|
|
|
} |
|
|
|
|
dg, _ = discordgo.New("Bot " + token) |
|
|
|
|
_ = dg.Open() |
|
|
|
|
unbanAll() |
|
|
|
|
runFunction() |
|
|
|
|
dg.Close() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func unbanAll() { |
|
|
|
|
func runFunction() { |
|
|
|
|
bans, _ := dg.GuildBans(guild) |
|
|
|
|
for _, v := range bans { |
|
|
|
|
dg.GuildBanDelete(guild, v.User.ID) |