GithubHelp home page GithubHelp logo

jamesbond5 / charmcord Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lilbabxjj-1/charmcord

0.0 0.0 0.0 9.26 MB

CharmCord is the best python string-based package for Discord bot creators!

Home Page: https://pypi.org/project/CharmCord

License: GNU General Public License v3.0

Python 100.00%

charmcord's Introduction

CharmCord

CharmCord is the best python string-based package for Discord bot creators!


Stats ✨

PyPI PyPI - Downloads Downloads PyPI - License All Contributors


logo


CharmCord Setups

Install CharmCord

pip install CharmCord
Warning: Package is still in Alpha and not meant to be used on public bots

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 ✨

aoi.py-contributors

charmcord's People

Contributors

lilbabxjj-1 avatar jagg3127 avatar allcontributors[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.