Use discord activities with your bot!
Project description
DiscordActivity
Discord activities in nextcord.
pip install DicsordActivity
Sync Example
import nextcord
from nextcord.ext import commands
from DiscordActivity import SyncActivity
bot = commands.Bot(command_prefix="!")
activity = SyncActivity(token='your-bot-token')
@bot.command()
async def fishing(ctx):
await ctx.send(f"Go fishing!\nhttps://discord.gg/{activity.get_activity(activity_name='fishing', author=ctx.author)}")
bot.run("your-bot-token")
Async example
import nextcord
from nextcord.ext import commands
from DiscordActivity import AsyncActivity
bot = commands.Bot(command_prefix="!")
activity = AsyncActivity(token='your-bot-token')
@bot.command()
async def fishing(ctx):
await ctx.send(f"Go fishing!\nhttps://discord.gg/{await activity.get_activity(activity_name='fishing', author=ctx.author)}")
bot.run("your-bot-token")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
DiscordActivity-1.0.0.tar.gz
(2.9 kB
view details)
File details
Details for the file DiscordActivity-1.0.0.tar.gz
.
File metadata
- Download URL: DiscordActivity-1.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0baeae4449ab342e43c5162eb0ebaf84624445a6fb8c94dae87bbffaaa00038 |
|
MD5 | 4c1d90a6ba7820268f41272cee4de834 |
|
BLAKE2b-256 | acd563f19727cc6699cdcca1e01fbabe194419cf61eec260f445bd8e68c658e3 |