Skip to main content

This creates a simple website to go with your discord.py bot on https://replit.com so it can be kept alive.

Usage

Run in shell:

poetry add dis-uniter

Store your bot token in a secret called DISCORD_TOKEN. Secrets are accessed through the lock icon on the left on desktop, and commands tab at the bottom > secrets on mobile.

from discord.ext import commands
from disuniter import keepAlive
bot = commands.Bot()
# normal bot code here...
keepAlive(bot)

Wait, where's the bot.run?? The keepAlive function does that for you

  1. To enforce using a secret to store your token so you don't expose it (NEVER expose it even if you are to remove it instantly, because people can check your repl's history)
  2. To restart your bot automatically when there's a rate limit. Rate limits are caused by too many requests from the same IP that is shared across multiple repls, and are responsible for downtimes on replit-hosted bots.

Why this?

  • No dependencies, unlike the typical Flask keep-alive
  • No spammy output, unlike Flask and the keep-alive I usually recommended on the replit discord
  • Restart your repl when there's a rate limit
  • It shows stats about your bot. You can update bot/user info shown by hitting enter. See https://discord-maths-bot.umarismyname.repl.co/
  • It automatically adds your repl to https://up.repl.link, a pinger, if it isn't already there
  • It uses Solarized, which is objectively the best colour palette ever.

Why is it called dis-uniter?

I am keeping Discord bots alive. Discord = disagreement. I am dis-uniting by keeping disagreements alive.

Release files for dis-uniter 1.4.0

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

Source distribution (sdist)

Source distribution for dis-uniter 1.4.0
File Size Uploaded
dis-uniter-1.4.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dis-uniter 1.4.0
File Interpreter ABI Platform
dis_uniter-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / dis-uniter-1.4.0.tar.gz

Download URL dis-uniter-1.4.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
79a4ef880b37ce16eb1bdf86dc5969a9160e12dcdd541134b813ffefac55176e
BLAKE2b-256 checksum
How to use checksums
4d4a7eb4de0cfba089d9eda669d654edf7d05a0f0e89b74baef7c5dd5803c743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0rc2 CPython/3.10.4 Linux/5.15.0-1021-gcp

Release files / dis_uniter-1.4.0-py3-none-any.whl

Download URL dis_uniter-1.4.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b221398ecb5e255d3c05eeb66265215b46e2e200b9ac24371ae361f4f0c1449
BLAKE2b-256 checksum
How to use checksums
2eb522f03e46f70e86dd3b2fac0e17c736bacd02087e953a5bee523a1319cad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0rc2 CPython/3.10.4 Linux/5.15.0-1021-gcp

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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