fix requirements and some spacing
This commit is contained in:
@@ -8,17 +8,19 @@ import dice
|
|||||||
def resolve(url):
|
def resolve(url):
|
||||||
return urllib.request.urlopen(url).url
|
return urllib.request.urlopen(url).url
|
||||||
|
|
||||||
# use the dice module for rolling
|
# use the dice module for rolling.
|
||||||
def roll(notation):
|
def roll(notation):
|
||||||
roll = dice.roll(notation)
|
roll = dice.roll(notation)
|
||||||
result = int(roll)
|
result = int(roll)
|
||||||
return roll,result
|
return roll,result
|
||||||
|
|
||||||
|
# check if user has admin role and output True if it's the case.
|
||||||
def checkrole(roles):
|
def checkrole(roles):
|
||||||
for role in roles:
|
for role in roles:
|
||||||
if str(role) == env.ADMIN_ROLE:
|
if str(role) == env.ADMIN_ROLE:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# check if the source channel is in the list of channels that are watched by the bot.
|
||||||
def checkchannel(channelid):
|
def checkchannel(channelid):
|
||||||
if channelid in env.GIFCHANNELS:
|
if channelid in env.GIFCHANNELS:
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ typing-extensions
|
|||||||
pylint
|
pylint
|
||||||
|
|
||||||
# needs this version, otherwise TypeErrors will break stuff
|
# needs this version, otherwise TypeErrors will break stuff
|
||||||
yarl==1.5.1
|
yarl==1.4.2
|
||||||
Reference in New Issue
Block a user