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.24.1
- Added
$addButton
functions to be used - Rewrote a lot of codebase to conform to PEP8 Standards
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.24.1.tar.gz
(33.7 kB
view hashes)
Built Distribution
charmcord-0.24.1-py3-none-any.whl
(62.3 kB
view hashes)
Close
Hashes for charmcord-0.24.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d13ac6c707ab180612bc788b4a7ce3ef888084de8790405bcd7c26d06a79bee6 |
|
MD5 | bb7dc67dce8948be4bd286c222d27c31 |
|
BLAKE2b-256 | 9b545014ba42a1b173d48377363ed75339f535974cc90060f01bb16023e78f33 |