Metadata-Version: 2.1 Name: MessageHandler Version: 1.0.2 Summary: A Command-like discord message handler for discord. Home-page: https://github.com/Tim232/MessageHandler Author: Tim232 Author-email: endbot4023@gmail.com License: Apache License 2.0 Platform: UNKNOWN Classifier: Programming Language :: Python :: 3 Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Description-Content-Type: text/markdown # MessageHandler This is a discord handler for people who use discord.Client but want to use the bot like discord.ext that is developed by Tim232. Example : main.py ```py import discord from handler import Handler client = discord.Client() mHandler = Handler(client=client, directory="modules", prefix="!", help_command=True) @client.event async def on_ready(): print(client.user.id) @client.event async def on_message(message): await mHandler.process_messages(message) client.run("token") ``` modules/test.py ```py import discord async def run(client, message): if message.content.startswith("!Test"): await message.channel.send("Example") await message.channel.send(client.user.avatar_url) if message.content == "!example": await message.channel.send("Test") content_key = ["!example"] startswith_key = ["!Test"] ``` * The handler automatically generates `{prefix}help` command if client's `help_command` is `True`.