github.com/M1sui/discord-cr
master / published Feb 5, 2026 / repository
A simple framework for make DiscordBot in the Crystal language.
discord-cr
A simple framework for make DiscordBot in the Crystal language.
Installation
-
Add the dependency to your
shard.yml:dependencies: discord-cr: github: your-github-user/discord-cr -
Run
shardsorshards install
Usage
require "discord-cr"
bot = DiscordBot.new("TOKEN")
bot.on_msg do |gid, cid, txt, uid, nic|
if txt == "ping"
bot.send(gid, cid, "pong!")
end
bot.run
Currently, only the message reception event and message transmission function are available.
Contributing
- Fork it (https://github.com/your-github-user/discord-cr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- InstanceMethod - creator and maintainer