Skip to content

Commit

Permalink
reformatted project using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesmaster committed Dec 24, 2023
1 parent 18af444 commit 3f2dabd
Show file tree
Hide file tree
Showing 11 changed files with 1,023 additions and 1,265 deletions.
448 changes: 236 additions & 212 deletions commands/bgg-collection.js

Large diffs are not rendered by default.

91 changes: 48 additions & 43 deletions commands/bgg-help.js
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)] });
}
}
Loading

0 comments on commit 3f2dabd

Please sign in to comment.