Skip to content

Commit 10f58f9

Browse files
q
need fix module
1 parent 9583f1f commit 10f58f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cogs/q.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import discord, base64, brainfuck #pip install brainfuck-interpreter
22
from discord.ext import commands
33
from discord.ext.commands import *
4+
from discord.errors import InvalidArgument
45

56
class ex(commands.Cog):
67
def __init__(self, client:commands.Bot):
78
self.client = client
89

910
@commands.command(name="decode")
10-
async def a(self, ctx, *, data):
11+
async def a(self, ctx, c, *, data):
1112
if c == "bin" or c == "binary":
1213
d = str()
1314
for i in data.split():
@@ -22,6 +23,6 @@ async def a(self, ctx, *, data):
2223
return await ctx.reply(base64.b64decode(data).decode("UTF-8"))
2324
elif c == "bf" or c == "brainfk" or c == "brainfuck":
2425
return await ctx.reply(brainfuck.evaluate(data))
25-
else: raise BadArgument
26+
else: raise InvalidArgument
2627

2728
def setup(client:commands.Bot): client.add_cog(ex(client))

0 commit comments

Comments
 (0)