🧹 Last bit of cleaning up before pushing

This commit is contained in:
NikolajDanger
2021-03-31 01:02:32 +02:00
parent b345720468
commit 6c1a1cf626
37 changed files with 125 additions and 118 deletions

View File

@ -8,14 +8,14 @@ class EventCog(commands.Cog):
# Sets the game and logs when the bot logs in
@commands.Cog.listener()
async def on_ready(self):
self.bot.log("Logged in as "+self.bot.user.name+", "+str(self.bot.user.id))
self.bot.log("Logged in as "+self.bot.user.name+", "+str(self.bot.user.id), level = 20)
game = discord.Game("Use /help for commands")
await self.bot.change_presence(activity=game)
# Logs when user sends a command
@commands.Cog.listener()
async def on_slash_command(self, ctx):
self.bot.log(f"{ctx.author.display_name} ran /{ctx.name}")
self.bot.log(f"{ctx.author.display_name} ran /{ctx.name}", str(ctx.channel_id), level = 20)
# Logs if a command experiences an error
@commands.Cog.listener()

View File

@ -25,11 +25,9 @@ class GamesCog(commands.Cog):
# Gives another user an amount of GwendoBucks
@cog_ext.cog_slash(**params["give"])
async def give(self, ctx, parameters):
async def give(self, ctx, user, amount):
await ctx.defer()
commands = parameters.split(" ")
amount = int(commands[-1])
username = " ".join(commands[:-1])
username = user.display_name
if self.bot.databaseFuncs.getID(username) == None:
async for member in ctx.guild.fetch_members(limit=None):
if member.display_name.lower() == username.lower():

View File

@ -12,7 +12,7 @@ class ReactionCog(commands.Cog):
if user.bot == False:
message = reaction.message
channel = message.channel
self.bot.log(f"{user.display_name} reacted to a message",str(channel.id), level = 10)
self.bot.log(f"{user.display_name} reacted to a message",str(channel.id))
try:
connectFourTheirTurn, piece = self.bot.databaseFuncs.connectFourReactionTest(channel,message,"#"+str(user.id))
except: