https://github.com/losuler/futaba
A silly Discord bot for a friend.
https://github.com/losuler/futaba
Last synced: 7 months ago
JSON representation
A silly Discord bot for a friend.
- Host: GitHub
- URL: https://github.com/losuler/futaba
- Owner: losuler
- License: gpl-3.0
- Created: 2020-04-20T16:27:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T02:11:17.000Z (about 3 years ago)
- Last Synced: 2025-02-08T22:07:07.196Z (over 1 year ago)
- Language: Go
- Size: 510 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Commands
- Show the current time of a user.
```
t.user, time.user
```
- Set the timezone of a user (`admin` must be set or the user themself to call)
```
s.user america/chicago, set.user america/chicago
```
- Assign or un-assign a role that mutes a user (`admin` must be set to `true` to call).
```
m.user, mute.user
!m.user, unmute.user
```
- Add all users to configuration file (`admin` must be set to `true` to call).
```
t.update, time.update
```
## Configuration
The configuration file `config.yml` has three main sections (see `config.yml.example`).
The `token` is the token for the bot (see [create a bot](#create-a-bot)).
```yaml
discord:
token: 1234567890
```
The `muteid` is the ID for the role that mutes a user (must be created manually).
```yaml
roles:
muteid: 1234567890
```
Each list entry refers to a user on the server.
- On Linux you can use `timedatectl list-timezones` to find the correct timezone.
- `admin` allows that specific user to call commands that require it (see [commands](#commands)).
```yaml
users:
- username: name
userid: 1234567890
timezone: America/Los_Angeles
nickname: nick
admin: false
```
## Create a bot
1. Browse to the [Discord Developer Portal](https://discordapp.com/developers/applications).
2. Click `New Application`.
3. Provide a name (can be different to the name of the bot itself).
4. Click `Bot` on the left side menu, then click `Add Bot`.
5. Under `Token`, click `Click to Reveal Token` to reveal the bot's token (used in `config.yml`).
6. In the left side menu, click `Bot`.
7. Under `Privileged Gateway Intents`, enable `Presence Intent` and `Server Members Intent`.
## Add a bot to a server
1. Replace `CLIENT_ID` with the client ID of the application (navigate to `General Information`
on the left side menu).
```
https://discordapp.com/oauth2/authorize?&client_id=CLIENT_ID&scope=bot&permissions=0
```
2. Select your server from the drop down menu.