You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide explains how to create a bot for Discord using the `async-discord` gem.
4
+
5
+
## Installation
6
+
7
+
First, create a project with a gemfile, and add the `async-discord` gem to it:
8
+
9
+
```bash
10
+
$ bundle add async-discord
11
+
```
12
+
13
+
## Creating a Bot
14
+
15
+
You will need to follow the [developer documentation](https://discord.com/developers/docs/intro) to create a bot and obtain a token. Once you have a token, you can create a bot like this:
This code will connect to the Discord gateway and listen for messages. When a message is received, it will log the payload to the console. You must make sure your bot is set up with the correct permissions to receive messages.
0 commit comments