Merge pull request #23 from pvanarkel/feature/user_flair

Cleanup
This commit is contained in:
Peter van Arkel authored and GitHub committed 2021-08-10 00:43:10 +02:00
commit aa908087ef
2 files changed
+2 -6

No files matched your search

-4
View File
@@ -38,11 +38,7 @@ class Games(commands.Cog):
async def bingo(self, ctx): async def bingo(self, ctx):
name = ctx.message.author.name name = ctx.message.author.name
bingocard = babbelbingo.bingo(name) bingocard = babbelbingo.bingo(name)
guild = ctx.message.guild
member = discord.utils.get(guild.members, id=ctx.message.author.id)
role = discord.utils.get(guild.roles , name='babbelbingo')
await ctx.author.send(file=discord.File(bingocard)) await ctx.author.send(file=discord.File(bingocard))
await member.add_roles(role)
@commands.Cog.listener() @commands.Cog.listener()
+2 -2
View File
@@ -13,7 +13,7 @@ handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(me
logger.addHandler(handler) logger.addHandler(handler)
class Miscellaneous(commands.Cog): class Misc(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
@@ -37,4 +37,4 @@ class Miscellaneous(commands.Cog):
def setup(bot): def setup(bot):
bot.add_cog(Miscellaneous(bot)) bot.add_cog(Misc(bot))