Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

MessageHandler

Easy discord handler for people who does not use discord.ext for discord bots.

  • LICENSE

Download

$ pip install messagehandler

Use

Example :

main.py

importdiscordfromhandlerimportHandlerclient=discord.Client()
mHandler=Handler(client=client, directory="modules", prefix="!", help_command=True)
@client.eventasyncdefon_ready():
print(client.user.id)
@client.eventasyncdefon_message(message):
awaitmHandler.process_messages(message)
client.run("token")

modules/test.py

importdiscordasyncdefrun(client, message):
ifmessage.content.startswith("!Test"):
awaitmessage.channel.send("Example")
awaitmessage.channel.send(client.user.avatar_url)
ifmessage.content=="!example":
awaitmessage.channel.send("Test")
content_key= ["!example"]
startswith_key= ["!Test"]
  • The handler automatically generates {prefix}help command if client's help_command is True.

Contribute

Find a bug and tell it on the Issue tab or to ! Tim23#9999 on discord

You can also Pull a request

Log

1.0.2 : Hotfix

1.0.1 : Hotfix

1.0.0 : First Release

About

This is an easy discord handler for people who does not use discord.ext for discord bots that is developed by Tim232.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages