Skip to content

Commit

Permalink
Merge pull request #3 from MajorArkwolf/develop
Browse files Browse the repository at this point in the history
Bug fixes.
  • Loading branch information
MajorArkwolf authored May 17, 2021
2 parents 5a94e76 + 1154bef commit be29d36
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
31 changes: 18 additions & 13 deletions agenda.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ async def on_message(self, message):
else:
database.SetServer(message.guild.id, defaultRoom, prefix,
message.guild.owner_id)

if message.content == (prefix + "help"):
var = 0
if command.VerifyRole(message.author.id, message.guild, 1):
var = 1
if command.VerifyRole(message.author.id, message.guild, 0):
var = 2
await helpmenu.HelpMenu(message, var)
await command.MessageCleanup(message)
return


if message.content.startswith(prefix + "setchannel"):
if command.VerifyRole(message.author.id, message.guild, 0):
Expand Down Expand Up @@ -140,12 +151,16 @@ async def on_message(self, message):
if message.content.startswith(prefix + "addadmin"):
if command.VerifyRole(message.author.id, message.guild, 0):
await command.AddAdmin(message)
return
else:
await command.ErrorPrivilege(message)
return

if message.content.startswith(prefix + "removeadmin"):
if command.VerifyRole(message.author.id, message.guild, 0):
await command.AddAdmin(message)
return
await command.RemoveAdmin(message)
else:
await command.ErrorPrivilege(message)
return

if message.content == (prefix + "viewadmins"):
if message.channel.name == defaultRoom:
Expand All @@ -165,16 +180,6 @@ async def on_message(self, message):
await command.ViewAgenda(message)
return

if message.content == (prefix + "help"):
var = 0
if command.VerifyRole(message.author.id, message.guild, 1):
var = 1
if command.VerifyRole(message.author.id, message.guild, 0):
var = 2
await helpmenu.HelpMenu(message, var)
await command.MessageCleanup(message)
return

async def on_guild_join(self, var):
id_exists = database.GetServer(var.id)
if id_exists is False:
Expand Down
2 changes: 2 additions & 0 deletions agendacommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,5 +404,7 @@ def VerifyRole(id, guild, level):
elif id == admin2 or id == admin3:
if level == 1:
return True
else:
return False
else:
return False

0 comments on commit be29d36

Please sign in to comment.