GithubHelp home page GithubHelp logo

guidojw / arora-discord Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 8.69 MB

Extensive Discord utility bot that can optionally be connected with arora-api. Used in the 6000 member Twin-Rail and 2300 member NS Roblox servers.

License: MIT License

JavaScript 0.31% Shell 1.38% Dockerfile 0.09% TypeScript 98.22%
bot discord roblox

arora-discord's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bloxcord

arora-discord's Issues

Set up Continuous Integration/Continuous Deployment

A feature I've been wanting to do for a long time.

Options: TravisCI, CircleCI, Buildkite, ...
I think I wanna go for Buildkite as I'm most experienced with that and it seems like they have a free plan that provides my needs.

Steps:

  • Linter
  • Tests (non-existent now, need to work on that).
  • Deploy

This can greatly be used coexistently with Docker.

Whois command errors on random users

May be related to the roblox-user argument type.

Example:

  • on Roblox user with ID 2475566280, it errors "cannot read property 'id' of undefined"

Add Privacy Policy

Discord's new TOS require all bots to have a privacy policy, even if it just states that no personal information is collected.
Write one and make a new tag for it. A nice example is https://moonlightbot.gitbook.io/docs/start-up/privacy-policy

Privacy Policy Expectations

We expect that a basic privacy policy would at minimum include the following:

  1. What data do you collect, including but not limited to personal identifying information?
  2. Why do you need the data?
  3. How do you use the data?
  4. Other than Discord the company and users of your own bot on Discord the platform, who do you share your collected data with, if anyone?
  5. How can users contact you if they have concerns about your bot?
  6. If you store data, how can users have that data removed?

If you do not store data, you still need a privacy policy, even if that policy says "We do not store data" before still providing users with a way to contact you about their concerns.

We do not have any specific expectations with regard to how you make your privacy policy available. We simply expect that you do your best to make it available to your users however you see fit. This can be a link to a website, a command in your bot, a link to a Pastebin, the option for users to request it via DM, or pretty much anything that empowers users to go find your policy if they should want it.

Will this cover every legal obligation you may or may not have as a software developer working with user information at scale? We can't really speak to this, and if you are concerned about your legal obligations regarding GDPR, CCPA, and other regional data regulations, we would advise speaking with a lawyer. Would this cover our expectations for you as a user of our API? Yes.

Style changes

Add a .editorconfig file to indicate editor configurations like what eol and indent-style is used.

Also make decisions about other style changes that can be indicated in the .eslintrc file.
Rules that I've been considering lately:

  • the use of semi colons

Ability to change the bot's activity

Add the ability to change the bot's activity with a command.

Should find a good way to implement this without breaching the bot's security. In the end the bot developer is responsible for if the bot complies with Discord's ToS.
Probably: only give the bot owner (me) or guild owners the ability to change it, and only make it changeable if the bot is in only one guild (as otherwise other guilds may be able to see activities not relevant to them).

New adapter for Roblox unauthorized GET requests

Implement a new adapter that can be used for all the Roblox get requests that don't require authorization. This way several more commands can have their requiresApi: true removed because they don't have to request this information via the API anymore.

Archive ticket dialogs

Archive the whole dialogs of a ticket by putting it in a .txt file and sending it to a new #archives channel.

Archive ticket dialogs

Archive the whole dialogs of a ticket by putting it in a .txt file and sending it to a new #archives channel.

Tests

Implement tests for the things like the services, helpers, etc. If Discord can be mocked in a good way, also make tests for the Discord structures.

  • models validation (so with connection to db)
  • services
  • util

Tag command arguments

Add support for arguments to the tag command so that one can for example run /tag train @user and then get an embed replied where the provided tag is used.

Discord Interactions

Look into using the new Discord slash commands feature.

Main problems I can currently think of that need a solution:

  • all the custom argument types the bot currently uses cannot work, Discord slash commands come with a preset of default types.
  • will probably take a long time for Commando to get slash commands support, move to a self-made command handler?

More general timezone in trainings messages

Change the timezone to whatever Node.js returns; something like "GMT+1". This so that running the bot on other machines at other places will always give an as correct as possible timezone.

Node.js API:
new Date().toLocaleTimeString('en-us', { timeZoneName: 'short' }).split(' ').pop()

Show API latency in stats command

And preferably make it a command that can be used outside of guilds too (so remove guildOnly and only show the System statuses tab when called in a guild).

Persistence

Add persistence to the bot (needs to be Dockerized first to simplify the process of adding a new db).

This will enable future updates like:

  • /addtag command
  • ticket persistence (ticket numbers and member ids)
  • move settings out of json to db
  • role persistence

Rewrite using Discord.js Commando

Discord.js Commando is a nice framework that has implementations for command groups, permissions, enabling/disabling commands, reloading commands, command use cooldowns and more.

Use Sentry for application monitoring

Sentry is a handy tool that can be used to monitor the application by for example having the errors in one place. It can also be connected to a Discord webhook so that people will be notified of errors immediately.

Premium Booster Reports inaccuracy

If someone boosted a server at the 29/30/31th of a month and the next month doesn't go until that day number, the job will not see that player as someone who has been boosting for one/more whole months.

Voice channel chat

Add voice channel chat channels, channels that users will be able to chat in once they are in a voice channel.

Merge TRadmin into NSadmin

Since the repositories of TRadmin and NSadmin are very similar in code, I'd like to merge them so that adding future updates gets easier.

Commands that aren't used by one of the bots (for example the NSadmin group commands) can be easily disabled by the built-in Commando /disable command. This command allows for command groups to be disabled.

The bots can of course still run on the different Discord tokens to persist their names & profile pictures.

To do (update later on):

  • Get rid of applicationConfig.primaryColor, make it depend on the color of the bot's role in the bot's main guild.
  • Disable commands and groups by default.
  • Add Command.requiredRoles and Command.bannedRoles, saved per guild.
  • Add bot settings like "apiEnabled" from which the bot decides to connect to the API or not.
  • Change Buildkite deploy buttons to "Deploy NSadmin", "Deploy TRadmin" & "Deploy both".

Dockerize app

Dockerize the app so that adding features like persistence (db) get way easier.

Possible memory leak at startup

With all the original includes in the Guild model #164 introduced, the docker stats memory usage of the container went up to a whopping 5.881 GiB (I set the limit as 6000 for testing, it probably reached that limit).

After some testing I found that if I for example comment the RoleBinding model include, or comment all the includes after that (but not the RoleBinding include), it only goes up to 500 MB at bot start up and eventually goes down to around 40 MB.

Not sure what's exactly causing this, maybe it's a leak in Sequelize?

Ask for optional arguments when interactively collecting arguments

For example the rankBack argument in /suspend and the specialNotes argument in /host. If these commands are ran using the interactive way, the argument collector will not ask for the optional arguments and thus will be their default values. This is not always desirable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.