Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
fix for db and two secret commands added
Browse files Browse the repository at this point in the history
  • Loading branch information
djetelina committed May 18, 2016
1 parent 8cacfac commit 9de3407
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions cogs/restricted.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import checks
import descriptions as desc
import channels as chan
import discord


class Restricted:
Expand All @@ -13,6 +14,22 @@ def __init__(self, bot):
async def develop(self):
await self.bot.say('iScrE4m is streaming my development over at http://twitch.tv/iScrE4m - come watch!')

@commands.command(hidden=True, description="not for you")
@checks.is_scream()
async def avatar(self, image: str):
try:
with open("cogs/avatar/" + image, "rb") as avatar:
f = avatar.read()
bytes = bytearray(f)
await self.bot.edit_profile(avatar=bytes)
except:
await self.bot.say("Can't find that image")

@commands.command(hidden=True, description="not for you")
@checks.is_scream()
async def play(self, *, playing: str):
await self.bot.change_status(game=discord.Game(name=playing))

@commands.command(hidden=True, pass_context=True, description=desc.rtfh, brief=desc.rtfhb)
@checks.mod_or_permissions(manage_messages=True)
async def rtfh(self, ctx, target: str, cmd: str):
Expand Down
2 changes: 1 addition & 1 deletion cogs/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Stats:
def __init__(self, bot):
self.bot = bot
self.db_path = os.path.join(os.getcwd(), "cogs/db/stats.db")
self.db_path = os.path.join(os.getcwd(), "cogs/db/stats_active.db")
self.database = sqlite3.connect(self.db_path , timeout=1)
self.database.row_factory = sqlite3.Row
self.db = self.database.cursor()
Expand Down

0 comments on commit 9de3407

Please sign in to comment.