mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-15 05:36:54 +00:00
Added the battle fighting commands, restructured the way hp and mp are stored, and added weapons. NOTE: UPDATING THE HP AND MP DOES NOT WORK
This commit is contained in:
@@ -147,6 +147,7 @@ bot.on('interactionCreate', async interaction => {
|
||||
const doc = result[1];
|
||||
const threadname = doc.thread;
|
||||
const dbo = client.db(interaction.guildId + '[ECON]').collection(id);
|
||||
|
||||
dbo.find({ 'state': {$exists: true} }).toArray(async function (err, docs) {
|
||||
if (interaction.user.id == id) {
|
||||
await interaction.deferReply();
|
||||
@@ -154,7 +155,7 @@ bot.on('interactionCreate', async interaction => {
|
||||
//Check State
|
||||
if (docs[0].state == STATE.FIGHTING) {
|
||||
//Do turn stuff
|
||||
bot.commands.get('game').in_game_redirector(bot, interaction, threadname, doc, client, mongouri, items);
|
||||
bot.commands.get('game').in_game_redirector(bot, interaction, threadname, doc, client, mongouri, items, xp_collection);
|
||||
}
|
||||
|
||||
turnManager.changeTurn(client, bot, interaction);
|
||||
|
||||
Reference in New Issue
Block a user