UNPKG

discord-rb

Version:

Discord.rb is a library for interacting with the Discord API.

28 lines (19 loc) 711 B
<h1> Discord Ruby </h1> Discord.rb is a low bindings library for interacting with the official api of discord. We are not supporting many events yet as this project was started not so long ago. <br> <br> <h2> Examples: </h2> ```js const Discord = require("discord.rb") const Client = new Discord.Client() Client.Join("BOT_TOKEN") //Replace bot token with your bot's token. Client.on("WebsocketConnect", () => { console.log(`Logged in client ${Client.User.Tag}.`) }) //ready event Client.on("MessageCreate", async (Message) => { if (Message.User.Bot) return if (Message.Content === "!ping") { return Message.Channel.SendMessage(`${Message.User.Mention()} pong!`) } }) //message event ```