A small, fast and scaleable discord bot for conducting UT99 pugs and query UT99 servers.
- Create a discord application (bot) from here
- This bot uses mongoDB as it's primary database. Create a free cloud database instance from here
- Install Docker from here
- Create a file locally named
docker-compose.yml
and paste contents from here - In the same folder create a file locally named
.env
and paste contents from here - Copy the Discord Bot Token from the bot created at Step 1 and paste it after
=
inside.env
file - Copy the database URI from the database created from Step 2 and paste it after
=
inside.env
file - On your terminal/cmd run
docker-compose up -d
π
Before you continue π§
Commands denoted by π±βπ€ are
privileged
meaning the user must have a role namedbBot
to be able to use that command.
Commands denoted by πΈ can be used by
everyone
.
register π±βπ€
Usage -> .register
Registers your discord server with bBot. This is the first
command you should be using after the bot is invited to your discord server.
setpugchannel π±βπ€
Usage -> .setpugchannel
Typing this command in a channel will mark that channel to be used for pug
commands.
setquerychannel π±βπ€
Usage -> .setquerychannel
Typing this command in a channel will mark that channel to be used for query
commands.
ignorecommandgroup, igc π±βπ€
Usage -> .ignorecommandgroup group
All ignorable commands are classified into 2 groups, namely, pugs
and queries
. If for instance you do not want query commands from the bot and only care about the rest of it then you can ignore the queries
group.
unignorecommandgroup, uigc π±βπ€
Usage -> .unignorecommandgroup group
To unignore a command group which was previously ignored.
warn π±βπ€
Usage -> .warn @mention#0000 reason
Warns an user. Simultaneously, creates a log entry for auditing purposes.
logs π±βπ€
Usage -> .logs @mention#0000
Shows the last 10
logs of the mentioned user.
invite πΈ
Usage -> .invite
Generates an invite
for your server with no expiry and unlimited uses. If such an invite already exists, it re-uses that.
addgametype, agm π±βπ€
Usage -> .addgametype name totalPlayers totalTeams
Creates a new gametype which can be now pugged.
Note that totalTeams
must be less than 4 due to UT99 supporting 4 team colors only OR mix
if it's a mix gamemode
deletegametype, dgm π±βπ€
Usage -> .deletegametype name
Deletes an already present gametype.
Note that if there is atleast 1 user
joined for the gametype then this command will not work until the list is cleared.
defaultjoin πΈ
Usage -> .defaultjoin gametype1 gametype2 etc
Stores your default preference for joining pugs
list, ls πΈ
Usage -> .list gametype
or .list
There are 2 versions of this command, with gametype and without.
- If gametype is mentioned then it will show all the users who have currently joined the gametype
- If gametype is
not
mentioned then it will summarise all the gametypes with their names and a count of number of players joined / max players
liast πΈ
Usage -> .liast
Combination of list
and last
.
lsa πΈ
Usage -> .lsa
Shows the list of all
gametypes with users who present.
join, j πΈ
Usage -> .join gametype
or .j
There are 2 versions of this command, with gametype and without.
- If gametype is mentioned then it will join that
particular
gametype. - If gametype is
not
mentioned then it will join all gametypes saved in your default join preferences.
leave, lv, l πΈ
Usage -> .leave gametype
Removes yourself from the gametype.
lva πΈ
Usage -> .lva
Removes yourself from all
gametypes that you've joined.
promote, p πΈ
Usage -> .promote gametype
or .promote
There are 2 versions of this command, with gametype and without.
- If gametype is mentioned then it will promote that
particular
gametype. - If gametype is
not
mentioned then it will promoteall
gametypes with atleast 1 user joined sorted by the least number of users required to fill that pug.
Since this command makes use discord's @here
usage, then in order to counter spam
, users can be given a COOLDOWN role which will prevent them from using the command once every 120 seconds
.
captain, capt πΈ
Usage -> .captain
Adds you to the list of captains of the filled pug. Team color is RNG.
picking πΈ
Usage -> .picking
Shows the current picking
states of filled pug(s).
pick, p πΈ
Usage -> .pick index index2(?)
Picks at the user at the mentioned index and add them to your team. index2
can be specified if bot asks you to pick 2 players.
π² Bonus Usage π²
You can do a random pick by typing random
instead of the index.
tag πΈ
Usage -> .tag info
Adds meta information about yourself in all the pugs you've joined.
For example if you have no microphone then you can tag yourself .tag nomic
. This will help the captains later while picking and making a decision.
stats πΈ
Usage -> .stats
or .stats @mention#0000
There are 2 versions of this command, with mentioned user and without.
- If user is mentioned, then it will show the stats of the mentioned user.
- If user is
not
mentioned, then it will show your own stats.
last πΈ
Usage -> .last gametype
or .last
There are 2 versions of this command, with gametype and without.
- If gametype is mentioned, then it will show the last pug played for that specific gametype.
- If gametype is
not
mentioned, then it will show the last pug played irrespective of any gametype.
π² Bonus Usage π²
You can go beyond last by specifying a number after last like last3
or add that many t characters like .lasttt
top10played πΈ
Usage -> .top10played gametype
Generates an image of top 10 puggers for the gametype (sorted by most number of pugs played for the gametype).
pugstats πΈ
Usage -> .pugstats
Outputs a summary of total number of pugs played, individual pug count(s) and a timestamp when the first pug was played
autoremove, ar πΈ
Usage -> .autoremove expiry(?)
Automatically removes the user from all the pugs they have joined after expiry. Note that If no expiry is provided, it clears your autoremoval request (if any).
β² Expiry Parameters β²
m
for minutes or h
for hours or d
for days.
For example,
.autoremove 30m
will automatically remove the user from all the pugs after 30 minutes
.
.autoremove
will clear your autoremoval request.
add π±βπ€
Usage -> .add @mention#0000 gametype1 gametype2 etc
Adds the mentioned user to the list of specified gametypes.
remove π±βπ€
Usage -> .remove @mention#0000 gametype1 gametype2 etc
Removes the mentioned user from the list of specified gametypes.
forcepick π±βπ€
Usage -> .forcepick @mention#0000 index
Picks the player at the specified index for mentioned user's team.
reset π±βπ€
Usage -> .reset pugname
Resets the pug back into picking mode if it was filled.
block π±βπ€
Usage -> .block @mention#0000 duration reason
Blocks the mentioned user from joining pugs for a certain period of time.
β² Duration Parameters β²
m
for minutes or h
for hours or d
for days.
For example, .block @mention#0000 1d xyz reason
will block the mentioned user for 1 day.
unblock π±βπ€
Usage -> .unblock @mention#0000
Unblocks the mentioned user.
showblocked π±βπ€
Usage -> .showblocked
Shows the list of blocked users.
blockcaptain/blockcapt π±βπ€
Usage -> .blockcaptain @mention#0000 reason
Blocks the mentioned user from becoming a captain in pugs.
unblockcaptain/unblockcapt π±βπ€
Usage -> .unblockcaptain @mention#0000
Unblocks the mentioned user from becoming a captain in pugs.
showblockedcaptain/showblockedcapt π±βπ€
Usage -> .showblocked
Shows the list of blocked captains.
enablecoinflip π±βπ€
Usage -> .enablecoinflip gametype
Enables coin flip feature for the specified gametype (for mapvote purposes).
When the picking finishes, it will randomly decide which team won mapvote.
disablecoinflip π±βπ€
Usage -> .disablecoinflip gametype
Disabled coin flip feature for the specified gametype.
teamemojis π±βπ€
Usage -> .teameojis emoji gametype
Sets the preferred teamemoji for the gametype. emoji
can be one of agonies
, cores
or logos
.
Note that if gametype
is omitted then the default is change it for ALL gametypes.
setpickingorder π±βπ€
Usage -> .setpickingorder gametype pickingOrder
Enforces a custom picking order for the gametype. An example of a picking order for a gametype with 2 teams
is 1 2 2 1 1 2 2 1
. It goes like Red picks first, then blue picks 2 times then red picks 2 times then blue picks 2 times and finally last pick goes to red
Red - 1
Blue - 2
Green - 3
Gold - 4
Note that this command does not work for DUEL/MIX/DM
gametypes.
addqueryserver, aqs π±βπ€
Usage -> .addqueryserver address name
Adds a query server to the list of query servers.
deletequeryserver, dqs π±βπ€
Usage -> .deletequeryserver index
Deletes the query server at the specified index from the list.
editqueryserver, eqs π±βπ€
Usage -> .editqueryserver index attribute newValue
Edits the query server at the specified index in the list.
π Attributes π
name
for editing name, address
for editing address.
servers, server πΈ
Usage -> .servers
Shows the list of query servers.
query, q πΈ
Usage -> .query index
or .query customAddress
There are 2 versions of this command, with index and with custom address.
- If index is specified, it will query the query server's address at the specified index.
- If custom address is specified, it will query that specific address.
ip πΈ
Usage -> .ip index
Prints the address of the query server at the specified index in the list.