actually we don't even need that
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
df16b2ca88
commit
a28bc5ffeb
4
bot.py
4
bot.py
@ -13,7 +13,6 @@ import heavynode
|
|||||||
|
|
||||||
|
|
||||||
DISCORD_TOKEN = lib.getconfig('DISCORD_TOKEN')
|
DISCORD_TOKEN = lib.getconfig('DISCORD_TOKEN')
|
||||||
DISCORD_SERVER_ID = lib.getconfig('DISCORD_SERVER_ID')
|
|
||||||
HEAVYNODE_TOKEN = lib.getconfig('HEAVYNODE_TOKEN')
|
HEAVYNODE_TOKEN = lib.getconfig('HEAVYNODE_TOKEN')
|
||||||
COOKIE_NAME = lib.getconfig('HEAVYNODE_COOKIE_NAME')
|
COOKIE_NAME = lib.getconfig('HEAVYNODE_COOKIE_NAME')
|
||||||
COOKIE_VALUE = lib.getconfig('HEAVYNODE_COOKIE_VALUE')
|
COOKIE_VALUE = lib.getconfig('HEAVYNODE_COOKIE_VALUE')
|
||||||
@ -31,8 +30,7 @@ bot.add_cleanup(hn.shutdown)
|
|||||||
|
|
||||||
async def is_admin(ctx):
|
async def is_admin(ctx):
|
||||||
user = ctx.message.author
|
user = ctx.message.author
|
||||||
guild = discord.utils.get(bot.guilds, id=DISCORD_SERVER_ID)
|
member = bot.guilds[0].get_member(user.id)
|
||||||
member = guild.get_member(user.id)
|
|
||||||
if member is not None:
|
if member is not None:
|
||||||
for role in member.roles:
|
for role in member.roles:
|
||||||
if role.name == 'Admin' or role.name == 'Mod':
|
if role.name == 'Admin' or role.name == 'Mod':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user