I'm Thomas, a Scottish developer that works mainly in JS/Node~โจ
otter-computer / gaymersbot Goto Github PK
View Code? Open in Web Editor NEWThe bot that helps run the Gaymers Discord.
License: GNU General Public License v2.0
The bot that helps run the Gaymers Discord.
License: GNU General Public License v2.0
DM or mention (to be decided) the online (not idle, do not disturb or invisible) admins and mods when a new user joins the server in the #welcome-room.
Now that we're not on Heroku, the !status
command doesn't work. Should we either update this to work somehow with the new system or even just remove the command all together?
Set up leaderboards like Mee6 does. Then we can remove Mee6.
Have the leaderboards hosted on https://gaymers.gg/ on a "Leaderboards" page with the top 100 users.
Cron jobs seem to be executing far too frequently. This is skewing our stats calculations. It's not a huge problem if we are only looking at the top quantity of games, but if we want to be more precise this will need to be investigated.
The !joined
command is reporting that a user 'joined a few seconds ago'. I suspect that this was caused by the upgrade to discord.js 10.
Currently, !help
just ignores commands that require permissions. We should add an addendum to the !help
output when used in a DM that clarifies that running !help
on a server will also include permissions-based commands. We can then use the user context from server uses of !help
to build a better command listing. This is probably a good opportunity to clean up the help output to also include information about which commands can be used in certain channels, or in DMs.
In order to have italicized messages when mentioning a user, /me has to be used at the beginning of a message instead of * around the message.
It would be funny and interesting to record the usage of emoji on our server.
!playing command doesn't send a PM as the message length is too long.
We've cycled through multiple music bots and the free ones aren't great. We should at least evaluate adding this to Disco.
Another note in our testing is that we should look into volume equalization for this.
We should reimplement the !status
command to get the bot to tell us if it's alive, and what version/deploy it's running.
If a user has a nickname !getinfo does not work, but if they remove the nickname, !getinfo will work.
Could we get some usage tracking for the text channels?
Even something as simple as a message count per 24 hours.
Have it automatically report the stats each day in a new channel named "channel-stats".
If possible have it do a weekly wrap up with total stats and daily average.
Preferably it would be called !roles and function similarly to the !regions command. It must not list the restricted roles.
Should return something like:
@user 's avatar [link]
Returns a random cat image from http://random.cat/
Allow users to set Xbox Gamertag and PSN names
We recently ran into an issue where non-Members could talk in various text channels. We can use the bot to define a set of rules about permissions that should never be the case (ie only staff-like roles have administrative perms, non-Members are mostly restricted, etc). These tests could run each time a permission update happens and notify staff if a change breaks the rules.
Due to the way the roles work on Discord we also need to unset18 anyone given the restricted role, as they can still chat in the over-18 channel.
Don't worry about adding it back after, they can do that themselves.
Instead of relying on toProperCase
to normalize role names (and needing to abide by this assumption when creating roles on the server), the !role
command should iterate through the guild's roles and try to case-insensitive match the role to be selected.
When a user changes their Discord name the bot sends them the welcome back PM and states that they rejoined the server.
I know this was intended to detect rejoins, but I'm not sure if there's a way to make a distinction between name changes and actual rejoins.
Currently the command causes the normal success message to be sent, but with no targets listed. Just add a check that the number of targets is > 0.
Bot has inconsistent behavior when using a PM. Sometimes it will respond normally, sometimes with a specific result, other times will fail silently. We should consider unifying this behavior for most commands, adding an optional flag that allows for normal use/specific responses.
Allow multiple timeouts from the same command.
At the moment the 3rd argument is always time, with the 1st mention being the person that's timed out. Should figure a way to allow multiple tags and also a time.
In f233400 and 41d7265 I added try-catch blocks for message and event handlers. Within the catch block, I used console.trace to output the error to the console. This is an issue because the trace returned by console.trace traces to the trace call, not the error location. I'll probably need to change this to console.error and use the stack member of the exception.
Could the bot report weekly:
Total Members
New Members
Members that left
Members that were banned
Track games played on server, and rank from most time played of each game from highest to lowest.
League: 20 days, 13 hours
Overwatch: 13 days, 5 hours
The stats should reset each week and we could think of various ways to track the time.
Make it so there are invalid characters. If the bot reads a non legal character it just says "Oops, no emojis or special characters allowed!" or something to that effect. And limit the characters if you have to to make Spazer stop having seizures.
Perhaps even have limited fields? Limit it to 5-10 entries maybe? Seeing how this seems to be causing emotional distress for Spazer. ๐
Allows admins to give a user a timeout, setting the restricted role on someone for a set period of time.
The timeout command needs to revive remove the member role from users to stop them being able to talk in other channels.
DiscoBot appears to have been losing connection to Discord. Sometimes it seems to reconnect, but other times it will need to be manually re-deployed. This isn't optimal. Ideally DiscoBot would be more aggressive about staying connected.
Apparently no one reads the welcome messages and that made Twisted hella mad so he went off and wrote a new one:
__**Welcome to Gaymers!**__
{Short Description}
Please follow our rules. You can find them here: https://goo.gl/670LtP
If you have any questions you can use the @admin mention in any channel or PM an admin directly
__**Useful Commands**__
These commands can be used in any channel on the server.
**!help** - Discobot will PM you a complete list of commands.
**!regions** - Discobot will respond with a list of regions for the set region command.
**!setregion [region]** - Discobot will set your colour based on your region. For example `!setregion Europe` or `!setregion North America`
**!set18** - Discobot will give you access to the #over-18 channel.
!currentlyplaying produces no result while !whoisplaying League of Legends returns:
People that are currently playing League Of Legends:
Nobody! :(
which is incorrect.
If a user runs !role remove
for a role they don't have, the bot responds as if it successfully removed the role. While a cosmetic change, the bot should complain that this action doesn't make sense.
Returns a random penguin image from http://penguin.wtf/
Search giphy and return a random gif:
!giphy cat
Why have we still not made it so that DiscoBot or something adds the link/file restriction for the first three or so days of people joining. Maybe even a week of joining. I can not think of a single downside at all.
-reynbow
Some users are not given the standard welcome message, as well as any commands they try do not work / set their roles, but other users are still able to use the bot without issues.
Timeout length should be optionally customisable, maybe with a few preset lengths like 30 mins, 1hr, 6hr, 24hr or something
Add a role that restricts bot usage in the channel. Bot should check if users have this role before responding. If they do, it should ignore.
Hopefully this is a way to crack down on any bot spam without actually restricting them from chatting.
could we do two things: Have DiscoBot welcome new members with this message in #welcome-room "Welcome to Gaymers!
Please introduce yourself, and feel free to tell us about your favorite games, where you're from, how you heard about the server, and anything else about yourself you'd like to share.
We have region-based tags, to help you find local gaming friends, and some special tags for members who like Overwatch, Battlefield, League of Legends and more, and are happy to add them to your profile so you have an easier time finding folks to play with!"
and when the member tag is added have Disco welcome the member as it currently does in #general
A Chancla command would be lovely, with the ๐ก emoji, since its the best fitting one i guess. Make one of the random messages say "estoopid" too.
user- Today at 9:51 PM
!help
test-botBOT - Today at 9:51 PM
Available Commands:
Low priority, it would be nice to be able to DM all members with no rules reminding them to make their introduction or the bot will kick them in 24 hours. Just to purge the server of users online users who have never tried to gain access.
!status command that returns last commit ID, commit time, any other relevant information.
We could implement the basic "action" commands (eg hug, slap, etc) to be saved in the database. This would allow us to add, remove, or edit these commands at runtime without code changes and would de-clutter the codebase of a many functionally similar commands.
If a user has set a server specific nickname and uses a command that contains msg.mentions
then DiscoBot is unable to resolve their user ID.
Discord prepends their ID with a !
but it can be easily detected like so.
// Server nickname detection
if(userId.substr(2, 1) === "!") {
fixedId = userId.slice(3, userId.length - 1);
} else {
fixedId = userId.slice(2, userId.length - 1);
}
I would like to implement a handler for all of our errors that sends a message to the developer channel when an exception or error condition happens. My hesitation with this is that I'd like to have the server and channel configurable via a config file but that's not been possible with our history with Heroku.
!regions command says that !setregion can be used in any channel. Thai should be changed to specify it is a bot room only command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.