Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import asyncio
- import aiohttp
- import io
- from tinydb import TinyDB, Query
- class Client(discord.Client):
- def __init__(self):
- super().__init__()
- self.__commands = frozenset(['help', 'say', 'status', 'roll', '8ball','setosu', 'osu', 'taiko', 'ctb', 'mania', 'quote', 'backwards'])
- @property
- def session(self):
- return aiohttp.ClientSession()
- def parse(self, content, prefix):
- if content.lower().startswith(prefix) and content.lower() != prefix:
- args = content[len(prefix):].split(' ')
- command = args.pop(0).lower()
- if command in self.__commands:
- command = 'cmd_'+command
- return command, args
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement