-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from RileCraft/Unstable
V8 Release
- Loading branch information
Showing
81 changed files
with
2,123 additions
and
991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# AllClientPermissions | ||
## Usage | ||
```js | ||
allClientPermissions: ["permission", "permission"] | ||
// Example | ||
allClientPermissions: ["Administrator", "ModerateMembers"] | ||
``` | ||
* The client must have all the specified permissions to be able to execute the command else the error embed is sent. | ||
## Return Error | ||
```js | ||
returnAllClientPermissionsError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# AllUserPermissions | ||
## Usage | ||
```js | ||
allUserPermissions: ["permission", "permission"] | ||
// Example | ||
allUserPermissions: ["Administrator", "ModerateMembers"] | ||
``` | ||
* The user [The one who ran the command] must have all the specified permissions to be able to execute the command else the error embed is sent. | ||
## Return Error | ||
```js | ||
returnAllUserPermissionsError: Boolean // Default: True | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# AllowBots | ||
## Usage | ||
```js | ||
allowBots: Boolean // Default: false | ||
``` | ||
* **Note:** This is only applicable to `messageCommands` and this will allow other bots to be able to run the command as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# AllowInDms | ||
## Usage | ||
```js | ||
allowInDms: Boolean // Default: false | ||
``` | ||
* **Note:** This is only applicable to `messageCommands` and this will allow the command to be able to run in the bot's direct messages [dms]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# AnyClientPermissions | ||
## Usage | ||
```js | ||
anyClientPermissions: ["permission", "permission"] | ||
// Example | ||
anyClientPermissions: ["Administrator", "ModerateMembers"] | ||
``` | ||
* The client must have any one of the specified permissions to be able to execute the command else the error embed is sent. | ||
## Return Error | ||
```js | ||
returnAnyClientPermissionsError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# AnyUserPermissions | ||
## Usage | ||
```js | ||
anyUserPermissions: ["permission", "permission"] | ||
// Example | ||
anyUserPermissions: ["Administrator", "ModerateMembers"] | ||
``` | ||
* The user [who ran the command] must have any one of the specified permissions to be able to execute the command else the error embed is sent. | ||
## Return Error | ||
```js | ||
returnAnyUserPermissionsError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ChannelCooldown | ||
## Usage | ||
```js | ||
channelCooldown: Time in milliseconds | ||
// Example | ||
channelCooldown: 10000 // 10 Seconds cooldown | ||
``` | ||
* The user [who ran the command] must wait until the set amount of time passes before they can run the command again. **Note:** This cooldown is a __per channel cooldown__ meaning let's say if you put a channelCooldown in channel `A` of 24hrs then the user must wait 24hrs before they can run the command again in channel `A` but they can run the command again in channel `B`. | ||
## Return Error | ||
```js | ||
returnChannelCooldownError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# GlobalCooldown | ||
## Usage | ||
```js | ||
globalCooldown: Time in milliseconds | ||
// Example | ||
globalCooldown: 10000 // 10 Seconds cooldown | ||
``` | ||
* The user [who ran the command] must wait until the set amount of time passes before they can run the command again. **Note:** This cooldown is a __global cooldown__ meaning it applies to all the guilds. | ||
## Return Error | ||
```js | ||
returnGlobalCooldownError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# GuildCooldown | ||
## Usage | ||
```js | ||
guildCooldown: Time in milliseconds | ||
// Example | ||
guildCooldown: 10000 // 10 Seconds cooldown | ||
``` | ||
* The user [who ran the command] must wait until the set amount of time passes before they can run the command again. **Note:** This cooldown is a __per guild cooldown__ meaning let's say if you put a guildCooldown in guild `A` of 24hrs then the user must wait 24hrs before they can run the command again in guild `A` but they can run the command again in guild `B`. | ||
## Return Error | ||
```js | ||
returnGuildCooldownError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore | ||
* When set to `true` the command file will not be recorded. | ||
```js | ||
ignore: Boolean // Default: false | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OnlyChannels | ||
## Usage | ||
```js | ||
onlyChannels: ["channelId", "channelId"] | ||
// Example | ||
onlyChannels: ["channelId", "channelId"] | ||
``` | ||
* The command will only be able to be ran in those channels in that guild. | ||
## Return Error | ||
```js | ||
returnOnlyChannelsError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OnlyGuilds | ||
## Usage | ||
```js | ||
onlyGuilds: ["guildId", "guildId"] | ||
// Example | ||
onlyGuilds: ["guildId", "guildId"] | ||
``` | ||
* The command will only be able to be ran in those guilds. | ||
## Return Error | ||
```js | ||
returnOnlyGuildsError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OnlyRoles | ||
## Usage | ||
```js | ||
onlyRoles: ["roleId", "roleId"] | ||
// Example | ||
onlyRoles: ["roleId", "roleId"] | ||
``` | ||
* The command will only be able to be ran by users who possess any one of those roles in that guild. | ||
## Return Error | ||
```js | ||
returnOnlyRolesError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OnlyUsers | ||
## Usage | ||
```js | ||
onlyUsers: ["userId", "userId"] | ||
// Example | ||
onlyUsers: ["userId", "userId"] | ||
``` | ||
* The command will only be able to be ran by those users in that array. | ||
## Return Error | ||
```js | ||
returnOnlyUsersError: Boolean // Default: true | ||
```w |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# OwnerOnly | ||
## Usage | ||
```js | ||
ownerOnly: Boolean | ||
``` | ||
* Only the users who are in the `ownerIds` array in the config file will be able to run the command. | ||
## Return Error | ||
```js | ||
returnOwnerOnlyError: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ReturnErrors | ||
* When set to `false` the command will not return any of the command option's error embeds. | ||
```js | ||
returnErrors: Boolean // Default: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Button Interaction | ||
## Format | ||
```js | ||
// This format is for the button file that you will create in `Src/Interactions/Buttons`. | ||
module.exports = { | ||
name: "button's CustomId", | ||
run: async(client, interaction) => { | ||
// code | ||
} | ||
}; | ||
``` | ||
|
||
## Example Code | ||
### Button Creation Code | ||
```js | ||
const { ButtonBuilder, ActionRowBuilder } = require("discord.js"); | ||
const row = new ActionRowBuilder() | ||
.addComponents( | ||
new ButtonBuilder() | ||
.setCustomId('evalbutton') | ||
.setLabel('Delete Output') | ||
.setStyle('Danger'), | ||
); | ||
message.channel.send({ | ||
content: "This is a button", | ||
components: [row] | ||
}); | ||
``` | ||
|
||
### Button Code | ||
```js | ||
// Code for the `Src/Interactions/Buttons/EvalButton.js | ||
module.exports = { | ||
name: "evalbuttton", | ||
run: async(client, interaction) => { | ||
interaction.reply({ | ||
content: "This button is working!" | ||
}); | ||
} | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Events | ||
## Client Events | ||
### Format | ||
```js | ||
module.exports = { | ||
name: "clientEventName", | ||
run: async(<event args>, client, rootPath) => { | ||
// Code | ||
} | ||
}; | ||
``` | ||
### Example Code | ||
```js | ||
module.exports = { | ||
name: "channelCreate", // Omitted whenever a channel is created in a guild. | ||
run: async(channel, client) => { | ||
console.log(`A new channel was created in the ${channel.guild.name} of the name ${channel.name}.`); | ||
} | ||
}; | ||
``` | ||
|
||
## Non-Client Events | ||
### Format | ||
```js | ||
module.exports = { | ||
customEvent: true, | ||
run: async(client, rootPath) => { | ||
// Code | ||
} | ||
}; | ||
``` | ||
### Example Code | ||
```js | ||
module.exports = { | ||
customEvent: true, | ||
run: async(client, rootPath) => { | ||
client.Distube.on("addSong", (queue, song) => { | ||
// Your Code | ||
}); | ||
} | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# MessageCommands (With Aliases) | ||
## Format | ||
```js | ||
module.exports = { | ||
name: "commandName", | ||
aliases: ["commandName2", "commandName3"], // Optional to be provided. | ||
run: async(client, message, args) => { | ||
// Code Here | ||
} | ||
}; | ||
``` | ||
|
||
## Example Code | ||
```js | ||
module.exports = { | ||
name: "ping", | ||
aliases: ["pong"], | ||
run: async(client, message, args) => { | ||
message.channel.send({ | ||
content: `My ping is ${client.ws.ping}ms.` | ||
}); | ||
} | ||
}; | ||
|
||
// The command can be now ran with <BotPrefix>ping or <BotPrefix>pong and it will return the ping of the bot. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Modals | ||
## Format | ||
```js | ||
// This format is for the modalForms file that you will create in `Src/Interactions/ModalForms`. | ||
module.exports = { | ||
name: "modalName", | ||
run: async(client, interaction) => { | ||
// Code | ||
} | ||
}; | ||
``` | ||
## Example Code | ||
### Modal Creation Code | ||
```js | ||
const { ApplicationCommandType, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } = require("discord.js"); | ||
const modal = new ModalBuilder() | ||
.setCustomId('ExampleModal') | ||
.setTitle('My Modal'); | ||
|
||
const favoriteColorInput = new TextInputBuilder() | ||
.setCustomId('favoriteColorInput') | ||
.setLabel("What's your favorite color?") | ||
.setStyle(TextInputStyle.Short); | ||
|
||
const hobbiesInput = new TextInputBuilder() | ||
.setCustomId('hobbiesInput') | ||
.setLabel("What's some of your favorite hobbies?") | ||
.setStyle(TextInputStyle.Paragraph); | ||
|
||
const firstActionRow = new ActionRowBuilder().addComponents(favoriteColorInput); | ||
const secondActionRow = new ActionRowBuilder().addComponents(hobbiesInput); | ||
|
||
modal.addComponents(firstActionRow, secondActionRow); | ||
await interaction.showModal(modal); | ||
``` | ||
### Modal Code | ||
```js | ||
// Code for the `Src/Interactions/ModalForms/ExampleModal.js | ||
module.exports = { | ||
name: "ExampleModal", | ||
run: async(client, interaction) => { | ||
interaction.reply({ | ||
content: "This modal is correctly functioning." | ||
}); | ||
} | ||
}; | ||
``` |
Oops, something went wrong.