Skip to content

Commit

Permalink
Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mastermind-sap committed May 16, 2021
1 parent c2e1c35 commit 42e7866
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Binary file modified cogs/__pycache__/fun.cpython-38.pyc
Binary file not shown.
Binary file modified cogs/__pycache__/restricted.cpython-38.pyc
Binary file not shown.
8 changes: 4 additions & 4 deletions cogs/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ async def slap(self,ctx, user : discord.Member =None):
user=ctx.author
await ctx.send("Just slapped :wave: "+user.mention)
person = Image.open(requests.get(user.avatar_url, stream=True).raw)
slap = Image.open(".\cogs\slapping\slap.jpg")
slap = Image.open(".\\slapping\\slap.jpg")
person_res=person.resize((100,100))
area=(100,100,200,200)
slap.paste(person_res, area)
slap.save(".\\cogs\\slapping\\"+str(user.id)+".jpg")
with open(".\\cogs\\slapping\\"+str(user.id)+".jpg", 'rb') as f:
slap.save(".\\slapping\\"+str(user.id)+".jpg")
with open(".\\slapping\\"+str(user.id)+".jpg", 'rb') as f:
picture = discord.File(f)
await ctx.send(file=picture)
os.remove(".\\cogs\\slapping\\"+str(user.id)+".jpg")
os.remove(".\\slapping\\"+str(user.id)+".jpg")
except Exception as e:
print(e)

Expand Down
7 changes: 4 additions & 3 deletions cogs/restricted.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import json
import asyncio
import itertools
import io
from contextlib import redirect_stdout


mainaccid=open("mainaccid.txt", "r").read()
Expand All @@ -24,8 +26,6 @@ def __init__(self,bot):
##BUT RUNNING FROM SERVERS LIKE heroku TILL NOW HAVE NOT SHOWN ANY AFFECT ON THE CODING COMPUTER EVEN WITH OS MODULE CODES
##THE OUTPUT IS : "py"
##eval command->executes any python code and displays output(work in progress)
import io
from contextlib import redirect_stdout
@commands.command(aliases=["eval"])
@commands.check(is_it_me)
async def e(self,ctx,*,code):
Expand All @@ -41,8 +41,9 @@ async def e(self,ctx,*,code):
exec(compile(code,'mulstring', 'exec'))
out = stdout.getvalue()
await ctx.send("```py\n"+out+"```")
except:
except Exception as e:
await ctx.send("```py\n Error ```")
await ctx.send(e)
else:
await ctx.send("```py\n Sorry this code is restricted due to security reasons ```")

Expand Down
File renamed without changes

0 comments on commit 42e7866

Please sign in to comment.