Asmodasis / Discord-Loot_Bot

Discord bot to assist with the management of a loot system for use in the game World of Warcraft

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WOW Discord Bot

Thank you for reading this readme file, This program is designed to be a discord bot to aid in the distribution of loot for the popular game World of Warcraft.
The bot will be titled and refered to as loot-assistant. Loot-assistant was designed with vanilla World of Warcraft in mind, but thought was placed in the developement of the bot and
shall work with modern World of Warcraft expansions, it however is untested. The loot-assistant bot can be placed on a discord server of your choosing, however some set up on the server side is required.

The server will require an officer role, as most operations will be restricted to officers, as the premise here is that loot will be distributed by a loot council basis of which the officers are part of.
The server will require a class role with mentions enabled, for example @Priest will reference all priests and @Death Knight will reference all Death Knights(Modern WoW).
It is recommended that there be a specific channel at which the bot can interact with, as players can mute the channel and only get notifications should they receive loot.

Contained in the source code files will be an .env file for the bot.js file to reference all the tokens required. Provided will be a template form, but for example it shall look like so:

commandPrefix=~
botToken=BOT_TOKEN_HERE
guildID=ID_HERE
officerRoleID =ID_HERE
programmerRoleID=ID_HERE
guildMasterRoleID=ID_HERE
classLeaderRoleID=ID_HERE
priestRoleID=<@&NUMBER_HERE>
warriorRoleID=<@&NUMBER_HERE>
druidRoleID=<@&NUMBER_HERE>
mageRoleID=<@&NUMBER_HERE>
warlockRoleID=<@&NUMBER_HERE>
hunterRoleID=<@&NUMBER_HERE>
rogueRoleID=<@&NUMBER_HERE>
paladinRoleID=<@&NUMBER_HERE>
shamanRoleID = <@&NUMBER_HERE>
monkRoleID = <@&NUMBER_HERE>
deathKnightRoleID = <@&NUMBER_HERE>
demonHunterRoleID = <@&NUMBER_HERE>
botChannel=CHANNEL_ID_HERE
testChannel=CHANNEL_ID_HERE

The .env file contains the private information required to make the bot function, the commandPrefix variable is set to ~ but if you would like your commands to be something else, change this. Example ~loot or !loot
botToken is the unique token generated by discords bot authentication services. Please refer to https://discord.com/developers/docs/intro for more information regarding this.

The rest of the variables(constants) in the environment file are for each of the roles on your server. The only requirements are an officer role and class roles; If the server has a guild master with higher
permissions than the officers, then you may wish to place that there also.

The class Ids have to be placed in <@&NUMBER_HERE> format, where NUMBER_HERE is the ID you generate when you right-click on the class tag. Due to the nature of how this is parsed, this is a required format.

Commands


So the commands will follow a general basic structure here, where information will be stored in a text file where operations shall be performed on.
When first starting up the bot, you may wish to review either this README or type ~help for a private message from the bot on commands and how to use them.

First: ~create-file file_name
-- This will create and set a file at file_name, do not add any extensions here. For the lifespan of the bot, this file will be used for operations. Unless ~create-file or ~set-file command is used.
Second: ~what-file
-- This command will display the currently set file for the bot.
Third: ~add-player @Asmodasis @Priest
-- This command will add the player Asmodasis to the roster, Asmodasis plays the class Priest. Please refer to the previous paragraphs in this README. This must be done for all players
Fourth: ~create-raid 7/5/2020
-- This will create a raid for the date 7/5/2020, in the roster; it will also set the current raid. The currently set raid will be updated when a new raid is created OR when ~set-raid is invoked.
-- It is important to have a currently set raid, all ~loot commands will apply to this date in the roster and all ~loot-history commands will use this as the point of origin.
-- You also are not required to use dates, you may refer to the attributes by raid title if you prefer; but organization is important and left entirely to the user.
-- you may also feel inclined to add descriptors to this attribute, this is allowed. But must not include spaces, 7/5/2020(MC) or 7/5/2020(Molten_Core) are examples that WILL work. 7/5/2020(Molten Core) will NOT work.
Fifth: ~what-raid
-- This will display the currently set raid date

Congratulations, loot-assistant is now enabled to assist in the distribution of loot aided by the loot council.

Assuming you are now in the raid and would wish you give loot to a player, and with a current set raid date. You only need to create a file and set a file when the bot starts up.
Creating a raid will be required every new raid.

~loot, ~retract, ~loot-history, ~attendance will be your most used commands, if loot is given to a player, their attendance is taken.
When a raid is created, all users in the roster are assumed absent, using the attendance command will mark them present in the raid.
~loot-history can be invoked at any time, assuming a raid is set with ~set-raid or ~create-raid; this command will show the loot history for the class or the character specified.

Sixth: ~loot @Amodasis Ring
-- This command will give Ring to the player Asmodasis, referenced by the mention, the mention is required.
Seventh: ~retract @Asmodasis Ring
-- If Asmodasis received the item by mistake or would rather give the item to someone else, it can be removed from the raid date.
Eight: ~loot-history @Mention options
-- This command will display the loot history for the mentioned player or class, If a class is referenced then all players of that class will be displayed.
-- options can be either empty, 'all' or a numerical value, all will show every raids loot history prior to the currently set raid. Empty is 4 by default, and if I entered a numerical value like 3
then 3 raids prior to the currently set raid date will be shown. It is important that raids are created in order(as deemed by the user of this bot) as this bot does not enforce organization of the raid attributes.

  • ~help
~help
  • ~loot-history
~loot-history @Asmodasis all
~loot-history @Asmodasis 4
~loot-history @Asmodasis 
  • ~loot-history
~loot-history @Priest all
~loot-history @Warrior 4
~loot-history @Rogue 
  • ~loot
~loot @Asmodasis Ring
~loot @Asmodasis Shield
~loot @Asmodasis T2 Shoulders 
  • ~retract
~retract @Asmodasis Ring
~retract @Asmodasis Shield
~retract @Asmodasis T2 Shoulders 
  • ~add-player ~ap
~add-player @Asmodasis @Priest
~ap @Asmodasis @Priest
  • ~remove-player ~rp
~remove-player @Asmodasis
~rp @Asmodasis
  • ~attendance ~a
~attendance @Asmodasis
~a @Asmodasis
  • ~set-raid ~sr
~set-raid 7/5/2020
~sr 7/5/2020(Molten Core)
~sr Ahn Qiraj

~what-raid ~wr

~what-raid

~wr



- ~create-raid ~cr ~c

~create-raid 7/5/2020

~cr 7/5/2020(Molten Core)

~c Black Wing Lair

- ~delete-raid

~delete-raid 7/5/2020

~delete-raid 7/5/2020(Molten Core)


- ~set-file

~set-file raid_file

- ~what-file

~what-file

- ~create-file

~create-file raid_file

- ~backup-file

~backup-file

- ~restore-file

~restore-file

- ~delete-file

~delete-file raid_file

About

Discord bot to assist with the management of a loot system for use in the game World of Warcraft


Languages

Language:JavaScript 96.6%Language:Lua 3.4%