This repository has been archived by the owner. It is now read-only.

botwaycr v0.1.3

Crystal client package for Botway.

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
Repository

botwaycr

Owner
Statistic
  • 3
  • 0
  • 0
  • 0
  • 0
  • over 1 year ago
  • June 28, 2022
License

MIT License

Links
Synced at

Thu, 17 Oct 2024 09:56:32 GMT

Languages