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.9
- Return to project
- Fixed $memberJoined function
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.10.tar.gz
(30.5 kB
view hashes)
Built Distribution
Close
Hashes for charmcord-0.22.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b7e51ddc45670d7d01c9debf5f0e8c4f542c85a83bda2baa8cf16365a76309 |
|
MD5 | 458de81d38c0b0b7e23cd5cbcf204fae |
|
BLAKE2b-256 | e0c86521f7863d1cdebe058f03e08b071163329805a35d53f7c1c14da1fbc49d |