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.23.1
- Added
$reactionAdd
and$reactionRemove
events - Added new operation functions
$sub
,$divide
,$multi
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.23.2.tar.gz
(31.6 kB
view hashes)
Built Distribution
charmcord-0.23.2-py3-none-any.whl
(58.8 kB
view hashes)
Close
Hashes for charmcord-0.23.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc35400c822d75d176dde9ac6428637f554aa9d8d4e92159ef59ac3f7ccc1217 |
|
MD5 | 7e4d2a8f9799eadfd43c0b630608e810 |
|
BLAKE2b-256 | dc90c3510861cc4a1c572c05f1c1651bb03e77ef4b04d6fec390f509024da216 |