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 ✨
0.19.0 Update
New Functions
$hasPerm
$message
$charmAI
Lots of code refactoring and optimizing
Made functions easier to use on multi-lines
Updates to the docs
Minor Update
- Made
$sendEmbed
response automatically change depending on context of the command (Whether it's a slash command or normal command)
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.onReady(
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", type="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.onReady(
Code="$console[Bot is Ready]"
)
bot.slashCommand(
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.19.2.tar.gz
(30.2 kB
view hashes)
Built Distribution
charmcord-0.19.2-py3-none-any.whl
(53.9 kB
view hashes)
Close
Hashes for charmcord-0.19.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf8b38c43c1747595c7ff98975375ab1577b63214e67f0e3cd4e3c01a9971ae4 |
|
MD5 | e52185f31a807a117bbdad35c62d62b7 |
|
BLAKE2b-256 | dc5cbc962bebe6749d6eeb7d825d5c7717202b74d5b7e62f78de72f383e8e451 |