Skip to content

Commit

Permalink
inform owner
Browse files Browse the repository at this point in the history
  • Loading branch information
AEnterprise committed Apr 19, 2019
1 parent 1def7e9 commit 52ac314
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GearBot/Bot/TheRealGearBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ async def on_guild_join(guild):
blocked = Configuration.get_persistent_var("blacklist", [])
if guild.id in blocked:
GearbotLogging.info(f"Someone tried to add me to blacklisted guild {guild.name} ({guild.id})")
try:
await guild.owner.send("Someone tried adding me to {guild.name} (``{guild.id}``) but the server has been blacklisted")
except Exception:
pass
await guild.leave()
else:
GearbotLogging.info(f"A new guild came up: {guild.name} ({guild.id}).")
Expand Down

0 comments on commit 52ac314

Please sign in to comment.