* Switch training and helping to slash commands
* Remove intents
* Change formatting slightly
* Stop bot from registering slash commands multiple times
* Fix intents
* Have slash commands register as they weren't in every server
* Add privileged intents
* Remove privileged intents (not needed) and use interaction.user.id as member is undefined in DMs
* Use set instead of create for slash commands
* Capitalize first letter of command descriptions
* Convert round command to slash commands
* Fix setting commands to use the entire array instead of looping through it
* Remove default response if message starts with "do be"
* Use full form body instead of storing it in variable
* Replace separate round commands with single round command using subcommands
* Fix round commands
* Add description for rounds command
* Use rounds function instead of generateRound function
* Use interaction.user instead of undefined interaction.author
* Remove mention from generated message
* Replace message.author with interaction.user
* Move embed to options
* Make generated round message ephemeral
* Get rid of generating message
* Make generated round message ephemeral
* Add hits to rounds command
* Register rounds hit as a command
* Add top command to slash commands
* Use interaction.user instead of nonexistent interaction.author
* Fix callback catch blocks to perform actions other than logging to the console
* Attempt to fix catch blocks always replying with errors
* Attempt to fix catch blocks always replying with errors
* Capitalize first letter of subject option description
* Add slash command for changelog
* Add about commands as slash commands
* Add ISS to slash commands
* Remove ISS from regular commands
* Add about bot command
* Change question timeout to 2 minutes
* Make sure to reply with the about bot embed
* Add source to question
* Update contributors
* Prevent AwesomeSciBo from losing its mind if there's no #general
* Update join message and set slash commands on guild join
* Remove misplaced semicolon
* Remove server-specific commands
* Remove message event but not functions
* Update .gitignore
* Change help message
"`do be helping`: display this help message\n`do be roundgen`: send a pdf round to the channel\n`do be scoring`: start a scoring session\n > `do be scoring (a/b)(4/10)`: add points to Team A or Team B\n > `do be scoring stop`: end scoring session and post final points\n > `do be servers`: send the number of servers this bot is a part of\n > `do be iss`: show the current location of the International Space Station\n`do be training`: send a quick practice problem (you **must** react to your answer, or the bot will yell at you)\n > subject options: astro, phys, chem, math, bio, ess, energy\n`do be top`: list cross-server top 10 players\n `do be about`: List people who contributed to this bot\n Source Code: https://github.com/ADawesomeguy/AwesomeSciBo (don't forget to star!)";
consthelpMessage="AwesomeSciBo has migrated to using slash commands! You can take a look at the different commands by typing `/` and clicking on the AwesomeSciBo icon."
constslashCommands=[
{
"name":"train",
"description":"Sends a single training question to be answered",
"options":[
{
"type":3,
"name":"subject",
"description":"Optional subject to be used as a filter",
"default":false,
"required":false
}
]
},
{
"name":"help",
"description":"Replies with a help message explaining what the bot can do"
},
{
"name":"rounds",
"options":[
{
"type":1,
"name":"generate",
"description":"Generates a round with randomized questions from https://scibowldb.com/",
"options":[]
},
{
"type":1,
"name":"list",
"description":"Lists your 5 most recently generated rounds with links",
"options":[]
},
{
"type":1,
"name":"hit",
"description":"Shows the total number of rounds hit as well as the number for the specific user",
"options":[]
}
],
"description":"Commands regarding rounds generated by AwesomeSciBo"
},
{
"name":"top",
"description":"Lists top ten scores across servers (server specific leaderboard WIP)"
},
{
"name":"about",
"options":[
{
"type":1,
"name":"contributors",
"description":"Lists contributors to the AwesomeSciBo bot",
"options":[]
},
{
"type":1,
"name":"changelog",
"description":"Lists the 5 most recent changes in a \"git log\" type format",
"options":[]
},
{
"type":1,
"name":"bot",
"description":"Lists information about AwesomeSciBo",
"options":[]
}
],
"description":"Commands regarding the creation/development of the bot"
},
{
"name":"iss",
"description":"Shows the location of the ISS on a map as well as all of the current astronauts within it"
}
]
client.once("ready",()=>{
client.application.commands.set(slashCommands);
// Connect to MongoDB using mongoose
if(!process.env.CI){
mongoose
@ -27,7 +106,7 @@ client.once("ready", () => {
// Log client tag and set status
console.log(`Logged in as: ${client.user.username}!`);
client.user.setActivity(
'for "do be helping" | Add me to your own server: adat.link/awscibo',
'for "/helping" | Add me to your own server: adat.link/awscibo',
.addField("Contributors",`<@650525101048987649> [tEjAs#8127]\n<@426864344463048705> [tetrident#9396]`,true)// Add more contributors here, first one is Abheek, second one is Tejas