Commit 99c46164 authored by Joseph's avatar Joseph
Browse files

fixed bugs

parent 345952a2
......@@ -214,7 +214,7 @@ async def on_message(message):
await message.channel.send(send_text)
return
elif content.startswith('!help'):
commands = ['!clublist\n\t\t - Lists all clubs in ' + message.channel.guild.name, '!joinclub Clubname\n\t\t - Joins the club Clubname', '!leaveclub\n\t\t - Leaves a server\'s club',
commands = ['!clublist\n\t\t - Lists all clubs in ' + message.channel.guild.name, '!describeclub Clubname\n\t\t - Gives a Clubname\'s self-provided description', '!joinclub Clubname\n\t\t - Joins the club Clubname', '!leaveclub\n\t\t - Leaves a server\'s club',
'!makeclub Clubname\n\t\t - Makes a club with the clubname Clubname','!admin\n\t\t - Opens a channel with you and admins', '!report person reason\n\t\t - Sends a report on a person to an admin or club convener.',
'!addtextchannel The-name-of-the-public-category The-new-channel\'s-name\n\t\t - Adds a new public text channel in a category',
'!removetextchannel The-name-of-the-public-category The-new-channel\'s-name\n\t\t - Removes the public text channel YOU MADE from the category. Doesn\'t work for other people\'s channels',
......
......@@ -90,7 +90,8 @@ class RestrictChanSuite:
'''
def get_restrictchan(clubs, name):
for club in clubs:
if club.name == name:
print(club.name.lower(), name.lower())
if club.name.lower() == name.lower():
return club
return None
......@@ -122,7 +123,7 @@ class RestrictChanSuite:
'''
def is_cli(clubs, channel):
for club in clubs:
if club.name.lower() + "-moderator_-command-line" == channel.name:
if club.name.lower() + "-moderator_-command-line" == channel.name.lower():
return club
return False
......@@ -236,11 +237,12 @@ class RestrictChanSuite:
await RestrictChanSuite.add_voice_channel(maybe_restrict_chan, content[len('!removevoicechannel '):])
return True
except:
print('could not find restrictchannelcommandline'); return False
print('could not find restrictchannelcommandline');
try:
command, chanName, name = content.split(' ')
chanName = 'R-' + chanName
except:
await message.channel.send('Invalid command: ' + message.content, delete_after = 5)
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment