CharmCord is the best python string-based package for Discord bot devs
Project description
CharmCord
CharmCord is the best python string-based package for Discord bot creators!
Stats ✨
v0.22.0
- Added
$getJson
and$sendDM
- Made errors command specific (says which command and function)
- Made functions able to read both mentions and IDs
CharmCord Setups
Install CharmCord
pip install CharmCord
Warning: Package is still in beta, use at your own risk | feel free to report issues
Simple Bot:
from CharmCord import CharmClient
# ---------------Imports--------------------
bot = CharmClient(prefix="!", case_insensitive=False, intents=("all",))
bot.variables({
"money": 199
})
bot.on_ready(
Code="$console[Bot is Ready]"
)
bot.command(
name="add-money",
code="""
$setUserVar[$args[1];money;$args[2]]
$sendMessage[$channelID;Added $$args[2] to $userName[$args[1]]'s account]
"""
# !add-money 123456789 300
# This would add money to the user variable then
# send a confirmation message in the channel it
# was invoked
)
bot.command(
name="Ping", # Command Name
code="""
$sendMessage[$channelID; Pong!! $ping]
""" # Command Code
)
bot.run("*******<<TOKEN>>***********")
Slash Interactions/Outside Commands/Activity:
from CharmCord import CharmClient, setActivity
# ---------------Imports--------------------
# Activity message is the actual status, the type is whether it'll
# be a game status, listening status, etc
act = setActivity(message="my servers", typing="watching")
# For Commands outside the main.py file, you should add the
# load_command_dir parameter with the name of your command file
bot = CharmClient(prefix="!", case_insensitive=False, intents=("all",), activity=act, load_command_dir="Commands")
bot.on_ready(
code="$console[Bot is Ready]"
)
bot.slash_command(
name="repeat", # Name of the slash command
args=["sentence"], # The required arguments
description="Repeats what you say", # Description of command
code="""
$slashSend[$slashArgs[1]]
""" # Code running on the command
)
bot.run("*******<<TOKEN>>***********")
New and still a work in progress
Contributors ✨
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
charmcord-0.22.5.tar.gz
(30.6 kB
view hashes)
Built Distribution
charmcord-0.22.5-py3-none-any.whl
(56.3 kB
view hashes)
Close
Hashes for charmcord-0.22.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b853183b4329850f0b4552adfc806ad16f3b4b173bbf4c0c26d2377ab2acd34a |
|
MD5 | df5c505bd2b38884256d07aea05336a1 |
|
BLAKE2b-256 | 4c8d6ca7a2e6166ec53a9056d5ed93741cd13aa28b1d58055c3a6bd353d6de01 |