Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 4ba7062

Browse files
authored
Add README.md to all examples (bwmarrin#1236)
* feat(examples/*): add readme Add README.md to all examples. * fix(examples): logo image link * fix(examples): add fixed width to logo * feat(examples): add titles * fix(examples/*): make logo smaller Make DiscordGo logo smaller to match description and title in size. * fix(examples/avatar): correct avatar url Use correct logo URL in avatar URL image example. * fix(examples/slash_commands): wording Fix wording of "step-by-step tutorial" note.
1 parent fb0566f commit 4ba7062

File tree

14 files changed

+367
-6
lines changed

14 files changed

+367
-6
lines changed

examples/airhorn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
22

33
## DiscordGo Airhorn Example
44

examples/auto_moderation/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
2+
3+
## DiscordGo Auto Moderation Example
4+
5+
This example demonstrates how to utilize DiscordGo to manage auto moderation
6+
rules and triggers.
7+
8+
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
9+
Discord chat channel for support.**
10+
11+
### Build
12+
13+
This assumes you already have a working Go environment setup and that
14+
DiscordGo is correctly installed on your system.
15+
16+
From within the auto_moderation example folder, run the below command to compile the
17+
example.
18+
19+
```sh
20+
go build
21+
```
22+
23+
### Usage
24+
25+
```
26+
Usage of auto_moderation:
27+
-channel string
28+
ID of the testing channel
29+
-guild string
30+
ID of the testing guild
31+
-token string
32+
Bot authorization token
33+
```
34+
35+
The below example shows how to start the bot from the auto_moderation example folder.
36+
37+
```sh
38+
./auto_moderation -channel YOUR_TESTING_CHANNEL -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN
39+
```

examples/autocomplete/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
2+
3+
## DiscordGo Slash Command Autocomplete Option Example
4+
5+
This example demonstrates how to utilize DiscordGo to create and use
6+
autocomplete options in Slash Commands. As this example uses interactions,
7+
slash commands and slash command options, it is recommended to read
8+
`slash_commands` example before proceeding.
9+
10+
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
11+
Discord chat channel for support.**
12+
13+
### Build
14+
15+
This assumes you already have a working Go environment setup and that
16+
DiscordGo is correctly installed on your system.
17+
18+
From within the autocomplete example folder, run the below command to compile the
19+
example.
20+
21+
```sh
22+
go build
23+
```
24+
25+
### Usage
26+
27+
```
28+
Usage of autocomplete:
29+
-guild string
30+
Test guild ID. If not passed - bot registers commands globally
31+
-rmcmd
32+
Whether to remove all commands after shutting down (default true)
33+
-token string
34+
Bot access token
35+
```
36+
37+
The below example shows how to start the bot from the autocomplete example folder.
38+
39+
```sh
40+
./autocomplete -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN
41+
```

examples/avatar/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
22

33
## DiscordGo Avatar Example
44

@@ -45,5 +45,5 @@ The below example shows how to set your Avatar from a local file.
4545
The below example shows how to set your Avatar from a URL.
4646

4747
```sh
48-
./avatar -t TOKEN -u http://bwmarrin.github.io/discordgo/img/discordgo.png
48+
./avatar -t TOKEN -u https://raw.githubusercontent.com/bwmarrin/discordgo/master/docs/img/discordgo.svg
4949
```

examples/components/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
2+
3+
## DiscordGo Components Example
4+
5+
This example demonstrates how to utilize DiscordGo to create and use message
6+
components, such as buttons and select menus. For usage of the text input
7+
component and modals, please refer to the `modals` example.
8+
9+
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
10+
Discord chat channel for support.**
11+
12+
### Build
13+
14+
This assumes you already have a working Go environment setup and that
15+
DiscordGo is correctly installed on your system.
16+
17+
From within the components example folder, run the below command to compile the
18+
example.
19+
20+
```sh
21+
go build
22+
```
23+
24+
### Usage
25+
26+
```
27+
Usage of components:
28+
-app string
29+
Application ID
30+
-guild string
31+
Test guild ID
32+
-token string
33+
Bot access token
34+
```
35+
36+
The below example shows how to start the bot from the components example folder.
37+
38+
```sh
39+
./components -app YOUR_APPLICATION_ID -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN
40+
```

examples/context_menus/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
2+
3+
## DiscordGo Context Menu Commands Example
4+
5+
This example demonstrates how to utilize DiscordGo to create and use context
6+
menu commands. This example heavily relies on `slash_commands` example in
7+
command handling and registration, therefore it is recommended to be read
8+
before proceeding.
9+
10+
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
11+
Discord chat channel for support.**
12+
13+
### Build
14+
15+
This assumes you already have a working Go environment setup and that
16+
DiscordGo is correctly installed on your system.
17+
18+
From within the context_menus example folder, run the below command to compile the
19+
example.
20+
21+
```sh
22+
go build
23+
```
24+
25+
### Usage
26+
27+
```
28+
Usage of context_menus:
29+
-app string
30+
Application ID
31+
-cleanup
32+
Cleanup of commands (default true)
33+
-guild string
34+
Test guild ID
35+
-token string
36+
Bot access token
37+
```
38+
39+
The below example shows how to start the bot from the context_menus example folder.
40+
41+
```sh
42+
./context_menus -app YOUR_APPLICATION_ID -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN
43+
```

examples/dm_pingpong/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
22

33
## DiscordGo Direct Message Ping Pong Example
44

examples/modals/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
2+
3+
## DiscordGo Modals Example
4+
5+
This example demonstrates how to utilize DiscordGo to send and process text
6+
inputs in modals. If you have not read `slash_commands` and `components`
7+
examples yet it is recommended to do so before proceesing. As this example
8+
is built using interactions and Slash Commands.
9+
10+
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
11+
Discord chat channel for support.**
12+
13+
### Build
14+
15+
This assumes you already have a working Go environment setup and that
16+
DiscordGo is correctly installed on your system.
17+
18+
From within the modals example folder, run the below command to compile the
19+
example.
20+
21+
```sh
22+
go build
23+
```
24+
25+
### Usage
26+
27+
```
28+
Usage of modals:
29+
-app string
30+
Application ID
31+
-cleanup
32+
Cleanup of commands (default true)
33+
-guild string
34+
Test guild ID
35+
-results string
36+
Channel where send survey results to
37+
-token string
38+
Bot access token
39+
```
40+
41+
The below example shows how to start the bot from the modals example folder.
42+
43+
```sh
44+
./modals -app YOUR_APPLICATION_ID -guild YOUR_TESTING_GUILD -results YOUR_TESTING_CHANNEL -token YOUR_BOT_TOKEN
45+
```

examples/pingpong/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
22

33
## DiscordGo Ping Pong Example
44

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<img align="right" alt="DiscordGo logo" src="/docs/img/discordgo.svg" width="200">
2+
3+
## DiscordGo Scheduled Events Example
4+
5+
This example demonstrates how to utilize DiscordGo to manage scheduled events
6+
in a guild.
7+
8+
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
9+
Discord chat channel for support.**
10+
11+
### Build
12+
13+
This assumes you already have a working Go environment setup and that
14+
DiscordGo is correctly installed on your system.
15+
16+
From within the scheduled_events example folder, run the below command to compile the
17+
example.
18+
19+
```sh
20+
go build
21+
```
22+
23+
### Usage
24+
25+
```
26+
Usage of scheduled_events:
27+
-guild string
28+
Test guild ID
29+
-token string
30+
Bot token
31+
-voice string
32+
Test voice channel ID
33+
```
34+
35+
The below example shows how to start the bot from the scheduled_events example folder.
36+
37+
```sh
38+
./scheduled_events -guild YOUR_TESTING_GUILD -token YOUR_BOT_TOKEN -voice YOUR_TESTING_CHANNEL
39+
```

0 commit comments

Comments
 (0)