https://github.com/botwayorg/botwaycr
Crystal client package for Botway.
https://github.com/botwayorg/botwaycr
bot botway crystal crystal-lang
Last synced: 5 months ago
JSON representation
Crystal client package for Botway.
- Host: GitHub
- URL: https://github.com/botwayorg/botwaycr
- Owner: botwayorg
- License: mit
- Archived: true
- Created: 2022-06-28T08:39:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T06:31:11.000Z (about 3 years ago)
- Last Synced: 2025-02-10T22:32:40.943Z (about 1 year ago)
- Topics: bot, botway, crystal, crystal-lang
- Language: Crystal
- Homepage: https://github.com/abdfnx/botway
- Size: 6.84 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
botwaycr
Crystal client package for Botway
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
botwaycr:
github: abdfnx/botwaycr
```
2. Run `shards install`
## Usage
> after creating a new crystal botway project, you need to use your tokens to connect with your bot.
```crystal
require "discordcr"
require "botwaycr"
token = Botwaycr::BW.new.get_token
client_id = Botwaycr::BW.new.get_app_id
client = Discord::Client.new(token: "Bot " + token, client_id: client_id.to_u64)
client.on_message_create do |payload|
if payload.content.starts_with? "ping"
client.create_message(payload.channel_id, "Pong!")
end
end
client.run
```
## Contributors
- [abdfnx](https://github.com/abdfnx) - creator and maintainer