Browse Source

fixed bug where two fun commands would trigger logging in dms

tags/v2.2.0
Roxie Gibson 5 years ago
parent
commit
750a9c80bc
2 changed files with 23 additions and 20 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +22
    -20
      roxbot/cogs/fun.py

+ 1
- 0
CHANGELOG.md View File

@@ -19,6 +19,7 @@ Roxbot now uses sqlite for guild settings. This hopefully will lead the more pos
#### Other changes
- Sanitation added to filenames using the `avatar` command to fix a error for users with illegal characters in their usernames.
- Fixed error when using `aethetics` and `zalgo` were used in dms.

---


+ 22
- 20
roxbot/cogs/fun.py View File

@@ -342,16 +342,17 @@ class Fun(commands.Cog):
converted = str(text).translate(wide_map)
output = await ctx.send(converted)

await self.bot.log(
ctx.guild,
"aesthetics",
User=ctx.author,
User_ID=ctx.author.id,
Output_Message_ID=output.id,
Channel=ctx.channel,
Channel_Mention=ctx.channel.mention,
Time=roxbot.datetime.format(ctx.message.created_at)
)
if isinstance(ctx.channel, discord.TextChannel):
await self.bot.log(
ctx.guild,
"aesthetics",
User=ctx.author,
User_ID=ctx.author.id,
Output_Message_ID=output.id,
Channel=ctx.channel,
Channel_Mention=ctx.channel.mention,
Time=roxbot.datetime.format(ctx.message.created_at)
)

@commands.command(aliases=["ft", "frog"])
async def frogtips(self, ctx):
@@ -509,16 +510,17 @@ class Fun(commands.Cog):
response = random.choice(zalgo_chars).join(zalgoised)
output = await ctx.send(response)

await self.bot.log(
ctx.guild,
"zalgo",
User=ctx.author,
User_ID=ctx.author.id,
Output_Message_ID=output.id,
Channel=ctx.channel,
Channel_Mention=ctx.channel.mention,
Time=roxbot.datetime.format(ctx.message.created_at)
)
if isinstance(ctx.channel, discord.TextChannel):
await self.bot.log(
ctx.guild,
"zalgo",
User=ctx.author,
User_ID=ctx.author.id,
Output_Message_ID=output.id,
Channel=ctx.channel,
Channel_Mention=ctx.channel.mention,
Time=roxbot.datetime.format(ctx.message.created_at)
)

@commands.command(aliases=["rf", "roxfacts", "roxfact"])
async def roxbotfact(self, ctx):

Loading…
Cancel
Save