示例#1
0
    def setUp(self):
        self.db = sqlite3.connect(":memory:")
        self.market = turnips.StalkMarket(self.db)

        t = self.market.get_all()

        assert len(t) == 0
示例#2
0
 async def on_ready(self):
     print('Logged on as {0}!'.format(self.user))
     self.report_channel = self.get_channel(int(os.getenv("ANNOUNCE_ID")))
     self.chan = 'global'
     self.db = sqlite3.connect("test.db") 
     self.market = turnips.StalkMarket(self.db)
     self.associated_user = {} # message id -> id of the user the message is about
     self.associated_message = {} # reverse mapping of the above
     self.sleepers = {}
     self.recently_departed = {}
     self.requested_pauses = {} # owner -> int representing number of requested pauses remaining 
     self.is_paused = {} # owner -> boolean
     self.descriptions = {} # owner -> description
示例#3
0
文件: lloidbot.py 项目: achenxu/lloid
 async def on_ready(self):
     print('Logged on as {0}!'.format(self.user))
     self.report_channel = discord.utils.get(self.get_all_channels(),
                                             name='turnip-bot')
     self.chan = 'global'
     # await self.report_channel.send("I'm online")
     self.db = sqlite3.connect("test.db")
     self.market = turnips.StalkMarket(self.db)
     self.associated_user = {
     }  # message id -> id of the user the message is about
     self.associated_message = {}  # reverse mapping of the above
     self.sleepers = {}
     self.recently_departed = {}