Browse Source

moved blacklist command to the utils file.

tags/v1.7.0
Roxie Gibson 6 years ago
parent
commit
fbd7f36de7
2 changed files with 9 additions and 8 deletions
  1. +1
    -8
      roxbot/__init__.py
  2. +8
    -0
      roxbot/utils.py

+ 1
- 8
roxbot/__init__.py View File

@@ -1,14 +1,7 @@
from roxbot import checks, http, guild_settings, converters, utils
from roxbot.load_config import *
from roxbot.logging import log


def blacklisted(user):
with open("roxbot/settings/blacklist.txt", "r") as fp:
for line in fp.readlines():
if str(user.id)+"\n" == line:
return True
return False
from roxbot.utils import blacklisted


__description__ = """RoxBot, A Discord Bot made by a filthy Mercy Main. Built with love (and discord.py) by Roxxers#7443.

+ 8
- 0
roxbot/utils.py View File

@@ -16,3 +16,11 @@ async def delete_option(bot, ctx, message, delete_emoji, timeout=20):
return await ctx.send("{} requested output be deleted.".format(ctx.author))
except TimeoutError:
await message.remove_reaction(delete_emoji, bot.user)


def blacklisted(user):
with open("roxbot/settings/blacklist.txt", "r") as fp:
for line in fp.readlines():
if str(user.id)+"\n" == line:
return True
return False

Loading…
Cancel
Save