discord-timers
A simple extension for discord.py which provides basic timer support.
Installing
pip install discord-timers -U
Example
import datetime
from discord.ext import commands, timers
bot = commands.Bot(command_prefix="!")
bot.timer_manager = timers.TimerManager(bot)
@bot.command(name="remind")
async def remind(ctx, time, *, text):
"""Remind to do something on a date.
The date must be in ``Y/M/D`` format."""
date = datetime.datetime(*map(int, time.split("/")))
bot.timer_manager.create_timer("reminder", date, args=(ctx.channel.id, ctx.author.id, text))
# or without the manager
timers.Timer(bot, "reminder", date, args=(ctx.channel.id, ctx.author.id, text)).start()
@bot.event
async def on_reminder(channel_id, author_id, text):
channel = bot.get_channel(channel_id)
await channel.send("Hey, <@{0}>, remember to: {1}".format(author_id, text))
bot.run("token")
Metadata
Release files for discord-timers 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| discord-timers-0.1.0.tar.gz | 5.0 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| discord_timers-0.1.0-py3.7.egg | Legacy Egg format | - | - | Details |
| discord_timers-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 kB
Release files / discord-timers-0.1.0.tar.gz
| Download URL | discord-timers-0.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
034dd9ad7657a992dbaa98d6b29c5e389df5b727d24f46be817c95adf719f3f4
|
|
BLAKE2b-256 checksum How to use checksums |
9828ab479f72fd14ac4affacee448acd09ea9f618bc6b05ada38d3e1412cd780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Release files / discord_timers-0.1.0-py3.7.egg
| Download URL | discord_timers-0.1.0-py3.7.egg |
|---|---|
| Size | 8.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
64ba41ee93ba80406b08b25ea6235e73fbc6958585a8d9bd85368d1f9e17fa86
|
|
BLAKE2b-256 checksum How to use checksums |
f1083f50316b3a2f0b8daf991caed186fb801f56ed38e2978aa47e160dbbbdb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Release files / discord_timers-0.1.0-py3-none-any.whl
| Download URL | discord_timers-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a58b511562d26d931d86c70cddde15efbd45edbefe5fa56b3672a098e3e24a8
|
|
BLAKE2b-256 checksum How to use checksums |
b9105b7e98393038b3804329258fe2885778f68b2e3f86b347e757c36e64fe23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Security for discord-timers 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.