import os import random import sys import traceback from datetime import datetime from getpass import getpass from argparse import ArgumentParser import discord import asyncio from pcbot import utils, config import plugins # Sets the version to enable accessibility for other modules __version__ = config.set_version("PCBOT V3") class Client(discord.Client): """ Custom Client class to hold the event dispatch override and some helper functions. """ def __init__(self, **kwargs): super().__init__(**kwargs) self.time_started = datetime.utcnow() self.last_deleted_messages = [] async def _handle_event(self, func, event, *args, **kwargs): """ Handle the event dispatched. """ try: result = await func(*args, **kwargs) except AssertionError as e:
import logging import inspect import os from datetime import datetime from getpass import getpass from argparse import ArgumentParser from traceback import print_exc import discord import asyncio from pcbot import utils, config import plugins # Sets the version to enable accessibility for other modules __version__ = config.set_version("PCBOT V3") class Client(discord.Client): """ Custom Client class to hold the event dispatch override and some helper functions. """ def __init__(self, **kwargs): super().__init__(**kwargs) self.time_started = datetime.utcnow() self.last_deleted_messages = [] async def _handle_event(self, func, event, *args, **kwargs): """ Handle the event dispatched. """ try: result = await func(*args, **kwargs) except AssertionError as e: