Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

botwaycr

Crystal client package for Botway

Installation

  1. Add the dependency to your shard.yml:

    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.

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 - creator and maintainer

About

Crystal client package for Botway.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages