-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,023 additions
and
1,265 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,47 +1,52 @@ | ||
const {SlashCommandBuilder} = require("@discordjs/builders"); | ||
const { SlashCommandBuilder } = require("@discordjs/builders"); | ||
|
||
module.exports = { | ||
data: new SlashCommandBuilder() | ||
.setName('help') | ||
.setDescription('Get help for bgg bot commands'), | ||
/** | ||
* Create Discord Embed for help | ||
* | ||
* @return {module:"discord.js".EmbedBuilder} | ||
*/ | ||
helpEmbed: (client) => { | ||
const { EmbedBuilder } = require('discord.js'); | ||
data: new SlashCommandBuilder() | ||
.setName("help") | ||
.setDescription("Get help for bgg bot commands"), | ||
/** | ||
* Create Discord Embed for help | ||
* | ||
* @return {module:"discord.js".EmbedBuilder} | ||
*/ | ||
helpEmbed: (client) => { | ||
const { EmbedBuilder } = require("discord.js"); | ||
|
||
return new EmbedBuilder() | ||
.setColor('#3f3a60') | ||
.setTitle('BGG Bot Commands') | ||
.addFields( | ||
{ | ||
name: 'Stats', | ||
value: 'BGG Bot is on '+client.guilds.cache.size+' servers' | ||
}, | ||
{ | ||
name: 'Collection', | ||
value: 'Get collection information for a bgg user.\nUsage: `/collection <bgg_username>`.' | ||
}, { | ||
name: 'Search', | ||
value: 'Get information for a board game from bgg.\nUsage: `/search <game_name>` and leave the extra option blank' | ||
}, | ||
{ | ||
name: 'Suggest', | ||
value: 'Get information for a board game from bgg and allow emjoi reactions for people looking to play.\nUsage: type `/search <game_name>` and tab to option "Suggest to play a game.".' | ||
} | ||
); | ||
}, | ||
/** | ||
* Execute Discord Command | ||
* | ||
* @param {module:"discord.js".Interaction} interaction | ||
* @return {Promise<void>} | ||
*/ | ||
execute: async function(interaction) { | ||
const { client } = interaction; | ||
return new EmbedBuilder() | ||
.setColor("#3f3a60") | ||
.setTitle("BGG Bot Commands") | ||
.addFields( | ||
{ | ||
name: "Stats", | ||
value: "BGG Bot is on " + client.guilds.cache.size + " servers", | ||
}, | ||
{ | ||
name: "Collection", | ||
value: | ||
"Get collection information for a bgg user.\nUsage: `/collection <bgg_username>`.", | ||
}, | ||
{ | ||
name: "Search", | ||
value: | ||
"Get information for a board game from bgg.\nUsage: `/search <game_name>` and leave the extra option blank", | ||
}, | ||
{ | ||
name: "Suggest", | ||
value: | ||
'Get information for a board game from bgg and allow emjoi reactions for people looking to play.\nUsage: type `/search <game_name>` and tab to option "Suggest to play a game.".', | ||
}, | ||
); | ||
}, | ||
/** | ||
* Execute Discord Command | ||
* | ||
* @param {module:"discord.js".Interaction} interaction | ||
* @return {Promise<void>} | ||
*/ | ||
execute: async function (interaction) { | ||
const { client } = interaction; | ||
|
||
await interaction.reply({ embeds: [this.helpEmbed(client)] }); | ||
}, | ||
}; | ||
|
||
await interaction.reply({ embeds: [this.helpEmbed(client)] }); | ||
} | ||
} |
Oops, something went wrong.