Skip to content

Commit fbcc06f

Browse files
authored
✨ | Added contributing section.
1 parent f55c105 commit fbcc06f

File tree

1 file changed

+103
-91
lines changed

1 file changed

+103
-91
lines changed

README.md

Lines changed: 103 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
![Logo](https://i.imgur.com/89Lv73l.png)
22
---
3-
<p style="text-align: center;">
4-
5-
![Version](https://img.shields.io/badge/Version-v1.0-22AFF5?style=flat-square&logo=git&logoColor=white) ![License](https://img.shields.io/badge/License-GPL--3.0-22AFF5?style=flat-square&logo=Open-Source-Initiative&logoColor=white) [![ko-fi](https://img.shields.io/badge/Ko--fi-Buy_Me_A_Coffee-FF5E5B?style=flat-square&logo=ko-fi&logoColor=white)](https://ko-fi.com/B0B73WFJT)
3+
<p align="center">
4+
<img src="https://img.shields.io/badge/Version-v1.0-22AFF5?style=flat-square&logo=git&logoColor=white" alt="Version" />
5+
<img src="https://img.shields.io/badge/License-GPL--3.0-22AFF5?style=flat-square&logo=Open-Source-Initiative&logoColor=white" alt="License" />
6+
<a href="https://ko-fi.com/B0B73WFJT"><img src="https://img.shields.io/badge/Ko--fi-Buy_Me_A_Coffee-FF5E5B?style=flat-square&logo=ko-fi&logoColor=white" alt="Ko-fi" /><a>
67
</p>
78

89
This Discord.js Template was designed to make building a Discord bot as simple as possible. Eliminate the hassle of setting up a new project with all the structures and handlers and get right to work on your bot with reusable embeds, dynamic handlers and a config file to customize everything!
@@ -33,7 +34,7 @@ errorEmbed(interaction, 'Error embed example description', 'Error embed example
3334

3435
Clone or Download this repository then get the dependencies by running:
3536

36-
```bash
37+
```sh-session
3738
npm install
3839
```
3940

@@ -63,116 +64,120 @@ Add custom emojis and extra color values by using this format:
6364

6465
```js
6566
module.exports = {
66-
name: 'eventName',
67-
once: 'true', //run once true/false
68-
async execute(<args>) {
69-
//Code
70-
},
67+
name: 'eventName',
68+
once: 'true', //run once true/false
69+
async execute( < args > ) {
70+
//Code
71+
},
7172
}
7273
```
74+
---
7375
</details>
7476

7577
<details>
7678
<summary>Slash commands format</summary>
7779

7880
```js
79-
const { SlashCommandBuilder } = require('@discordjs/builders');
81+
const { SlashCommandBuilder } = require('@discordjs/builders')
82+
8083
module.exports = {
81-
data: new SlashCommandBuilder()
82-
.setName('commandName')
83-
.setDescription('command description'),
84-
async execute(<args>) {
85-
// Code
86-
}
87-
}
84+
data: new SlashCommandBuilder()
85+
.setName('commandName')
86+
.setDescription('command description'),
87+
async execute( < args > ) {
88+
// Code
89+
}
90+
}
8891
```
92+
---
8993
</details>
9094

9195
<details>
9296
<summary>Context menus format</summary>
9397

9498
```js
95-
const { ContextMenuCommandBuilder } = require('@discordjs/builders');
99+
const { ContextMenuCommandBuilder } = require('@discordjs/builders')
100+
96101
module.exports = {
97-
data: new ContextMenuCommandBuilder()
98-
.setName('context-menu-name')
99-
.setType(2), // (2): USER , (3): MESSAGE
100-
async execute(<args>) {
101-
// Code
102-
},
102+
data: new ContextMenuCommandBuilder()
103+
.setName('context-menu-name')
104+
.setType(2), // (2): USER , (3): MESSAGE
105+
async execute( < args > ) {
106+
// Code
107+
},
103108
}
104109
```
110+
---
105111
</details>
106112

107113
<details>
108114
<summary>Buttons format</summary>
109-
115+
110116
Adding buttons to a message:
111117
```js
112-
const { MessageButton, MessageActionRow } = require('discord.js')
113-
module.exports = {
114-
let exampleButton = new MessageButton()
115-
.setLabel('Example')
116-
.setStyle('PRIMARY') // PRIMARY, SECONDARY, SUCCESS, DANGER, LINK
117-
.setCustomId('example_button')
118-
const row = new MessageActionRow().addComponents(exampleButton)
119-
120-
interaction.reply({
121-
content: 'Example message',
122-
components: [row],
123-
})
124-
}
118+
const { MessageButton, MessageActionRow } = require('discord.js') // At the top of the file.
119+
120+
let exampleButton = new MessageButton()
121+
.setLabel('Example')
122+
.setStyle('PRIMARY') // PRIMARY, SECONDARY, SUCCESS, DANGER, LINK
123+
.setCustomId('example_button')
124+
const row = new MessageActionRow().addComponents(exampleButton)
125+
interaction.reply({
126+
content: 'Example message',
127+
components: [row],
128+
})
125129
```
126130

127-
Button event:
131+
Button event format:
128132
```js
129133
module.exports = {
130-
name: 'example_button',
131-
aliases: ['aliase1_button', 'aliase2_button'],
132-
async execute(interaction) {
133-
if (interaction.customId == 'example_button') {
134-
interaction.reply({
135-
content: 'example button pressed.'
136-
})
137-
}
134+
name: 'example_button',
135+
aliases: ['aliase1_button', 'aliase2_button'],
136+
async execute(interaction) {
137+
if (interaction.customId == 'example_button') {
138+
// Code
139+
} else if (interaction.customId == 'aliase1_button') {
140+
// Code
141+
}
142+
}
143+
}
138144
```
145+
---
139146
</details>
140147

141148
<details>
142149
<summary>Select menu format</summary>
143-
150+
144151
Adding select menu to a message:
145152
```js
146-
const { MessageSelectMenu, MessageActionRow } = require('discord.js')
147-
module.exports = {
153+
const { MessageSelectMenu, MessageActionRow} = require('discord.js') // At the top of the file.
154+
148155
let selectMenu = new MessageSelectMenu()
149-
.setCustomId('select_example')
150-
.setPlaceholder('Nothing selected')
151-
.setMinValues(1)
152-
.setMaxValues(2)
153-
.addOptions([
154-
{
155-
label: 'Option #1',
156-
description: 'This is a description for option #1',
157-
value: 'first_option',
158-
emoji: '1️⃣',
159-
},
160-
{
161-
label: 'Option #2',
162-
description: 'This is a description for option #2',
163-
value: 'second_option',
164-
emoji: '2️⃣',
165-
}
166-
])
156+
.setCustomId('select_example')
157+
.setPlaceholder('Nothing selected')
158+
.setMinValues(1)
159+
.setMaxValues(2)
160+
.addOptions([{
161+
label: 'Option #1',
162+
description: 'This is a description for option #1',
163+
value: 'first_option',
164+
emoji: '1️⃣',
165+
},
166+
{
167+
label: 'Option #2',
168+
description: 'This is a description for option #2',
169+
value: 'second_option',
170+
emoji: '2️⃣',
171+
},
172+
])
167173
const row = new MessageActionRow().addComponents(selectMenu)
168-
interaction.reply({
169-
content: 'Example message',
170-
components: [row],
171-
})
172-
}
174+
interaction.reply({
175+
content: 'Example message',
176+
components: [row],
177+
})
173178
```
174179

175-
Select menu event:
180+
Select menu event format:
176181
```js
177182
module.exports = {
178183
name: 'select_example',
@@ -184,39 +189,42 @@ module.exports = {
184189
},
185190
}
186191
```
192+
---
187193
</details>
188194

189195
<details>
190196
<summary>Permissions/Cooldown format</summary>
191197

192198
```js
193-
const { SlashCommandBuilder } = require('@discordjs/builders');
199+
const { SlashCommandBuilder } = require('@discordjs/builders')
200+
194201
module.exports = {
195-
data: new SlashCommandBuilder()
196-
.setName('perms-cooldown-example')
197-
.setDescription('Permissions & Cooldown example'),
198-
cooldown: 5000, // Time in milliseconds.
199-
permissions: ['ADMINISTRATOR'],
200-
async execute(interaction) {
201-
interaction.reply({
202-
content: 'You have permission to run this command!',
203-
})
204-
}
202+
data: new SlashCommandBuilder()
203+
.setName('perms-cooldown-example')
204+
.setDescription('Permissions & Cooldown example'),
205+
cooldown: 5000, // Time in milliseconds.
206+
permissions: ['ADMINISTRATOR'],
207+
async execute(interaction) {
208+
interaction.reply({
209+
content: 'You have permission to run this command!',
210+
})
211+
}
205212
}
206213
```
214+
---
207215
</details>
208216

209217
<details>
210218
<summary>Legacy commands format</summary>
211219

212220
```js
213221
module.exports = {
214-
name: 'commandName',
215-
aliases: ['aliase1', 'aliase2'],
216-
description: 'command description',
217-
async execute(message) {
218-
// Code
219-
},
222+
name: 'commandName',
223+
aliases: ['aliase1', 'aliase2'],
224+
description: 'command description',
225+
async execute(message) {
226+
// Code
227+
},
220228
}
221229
```
222230
</details>
@@ -226,6 +234,10 @@ module.exports = {
226234
Join [this Discord server](https://discord.gg/HXQXSeYA3u) if you need any help.
227235

228236
_Documentations coming soon._
237+
238+
## Contributing
239+
240+
Before creating an [issue](https://github.com/EbaaCode/Djs-v13-bot-template/issues), please ensure that it hasn't already been reported/suggested You can also take a look at [the contributing guide](https://github.com/EbaaCode/Djs-v13-bot-template/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
229241

230242
## Disclaimer
231243

0 commit comments

Comments
 (0)