Skip to main content

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

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

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.

Metadata

Release files for MessageHandler 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for MessageHandler 1.0.2
File Interpreter ABI Platform
MessageHandler-1.0.2-py3-none-any.whl Python 3 none any Details

Release files / MessageHandler-1.0.2-py3-none-any.whl

Download URL MessageHandler-1.0.2-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
662c99a4f1e18c566a436c56fb4b06f7f57d479358d43a73eca1e8569fbf998a
BLAKE2b-256 checksum
How to use checksums
98be21bfa45cae067a873c99b2a5aa361392d5f57ff004b86cf2f00e75628321
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

Security for MessageHandler 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page