Skip to content

Commit 9583f1f

Browse files
authored
q
q
1 parent 263c637 commit 9583f1f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cogs/q.py

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

65
class ex(commands.Cog):
76
def __init__(self, client:commands.Bot):
87
self.client = client
98

109
@commands.command(name="decode")
11-
async def a(self, c, *, data):
10+
async def a(self, ctx, *, data):
1211
if c == "bin" or c == "binary":
1312
d = str()
1413
for i in data.split():
@@ -23,6 +22,6 @@ async def a(self, c, *, data):
2322
return await ctx.reply(base64.b64decode(data).decode("UTF-8"))
2423
elif c == "bf" or c == "brainfk" or c == "brainfuck":
2524
return await ctx.reply(brainfuck.evaluate(data))
26-
else: raise InvalidArgument
25+
else: raise BadArgument
2726

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

0 commit comments

Comments
 (0)