dirty cheater
This commit is contained in:
parent
be245a2972
commit
27d7314362
3 changed files with 32 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
*.json
|
||||
*.db
|
||||
|
||||
|
|
BIN
modules/__pycache__/bake.cpython-36.pyc
Normal file
BIN
modules/__pycache__/bake.cpython-36.pyc
Normal file
Binary file not shown.
|
@ -1,5 +1,34 @@
|
|||
|
||||
import dataset
|
||||
|
||||
|
||||
async def cheat(self, c, n, m):
|
||||
if not await self.is_admin(n):
|
||||
await self.message(c,'{} was a bad bad bad. {} got sucked into the oven'.format(n,n))
|
||||
m = m.split(' ')
|
||||
if len(m) > 2:
|
||||
await message(c, 'i refuse.')
|
||||
return
|
||||
inv = self.db['inv']
|
||||
inv.insert(dict(name=m[0], item=m[1]))
|
||||
await self.message(c,'ok il allow this once')
|
||||
|
||||
async def bake(self, c, n, m):
|
||||
if len(m) < 1:
|
||||
await self.message(c, 'Dummy thicc you cant bake air!')
|
||||
return
|
||||
inv = self.db['inv']
|
||||
its = (inv.find(name=n, item=m))
|
||||
supp = len(list(its))
|
||||
if supp < 1:
|
||||
await self.message(c, 'You dont have any {}'.format(m))
|
||||
return
|
||||
await self.message(c, 'You bake one of your {}, and out pops a undefined!'.format(m))
|
||||
|
||||
|
||||
async def init(self):
|
||||
pass
|
||||
self.db = dataset.connect('sqlite:///database.db')
|
||||
|
||||
self.cmd['bake'] = bake
|
||||
self.cmd['cheat'] = cheat
|
||||
|
||||
|
|
Loading…
Reference in a new issue