Coder Social home page Coder Social logo

rtbyte / rtbyte Goto Github PK

View Code? Open in Web Editor NEW
136.0 5.0 15.0 2.88 MB

An open-source modular multipurpose Discord bot built on the incredible Sapphire framework for discord.js

Home Page: https://rtbyte.xyz/

License: MIT License

TypeScript 100.00%
discord klasa discordjs rtbyte discord-bots bot hacktoberfest

rtbyte's Introduction

RTByte logo

RTByte

GitHub package.json version GitHub

Open Issues Open PRS Github All Contributors Crowdin

Discord Twitter

Description

RTByte is an open-source modular multipurpose Discord bot built on the incredible Sapphire framework for discord.js. It brings a ton of features to help you run and manage your server. With an easy setup, you'll be up and running within minutes.

For more information about the project, and a link to add the bot to your server, please visit rtbyte.xyz. For support, please join our Discord server.

Development

Requirements

Optionals

A note regarding self-hosting RTByte

While RTByte is, and always will be, open-source, we're not very supportive of the idea of others self-hosting the bot. While you're completely free to host RTByte yourself, you will not receive any support from us in doing so.

Like many other open-source Discord bots, RTByte hasn't been built with the idea of self-hosting in mind. We use many different services to ensure we're able to deliver the best solution available.

  • RTByte uses several external APIs. You'd need to create API keys in these for these to be able to fully use any features that may need them.
  • RTByte uses PostgreSQL, an open-source relational database, to store persistent data. Prisma, a TypeScript ORM, is used to interface with said database.
  • RTByte uses Sentry to track and monitor errors. Sentry is a paid service for which we've been granted an open-source license.

You can add RTByte to your server by visiting rtbyte.xyz/invite.

Contributors ✨

Thanks goes to these wonderful people:

rtbyte's People

Contributors

allcontributors[bot] avatar dependabot-preview[bot] avatar dependabot[bot] avatar imgbotapp avatar jankcat avatar jshull97 avatar mchangrh avatar mcumbers avatar pixelponcho avatar rasmusgerdin avatar rtbyte-bot avatar uzui2012 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rtbyte's Issues

Roles command not working if a member has a name similar to a joinable role

Describe the bug
The new membername feature being implemented across the board a couple weeks back, allowing mods to not have to @ a user when performing moderator actions on them. For the roles command, this breaks it if there's a member in the server with a similar name to a joinable role.

This issue can be circumvented by using -roles add @user role
Discovered in TMG Discord.

To Reproduce
Steps to reproduce the behavior:

  1. Have a joinable role called minecraft and a user with a name starting with minecraft.
  2. Have a user try to join it using -roles join minecraft
  3. User is told to specify a role by it's name.

Expected behavior
The user is added to the role.

Screenshots
Error:
image

Workaround:
image

TypeError: Cannot read property 'id' of null

Sentry Issue: RTBYTE-F

TypeError: Cannot read property 'id' of null
  File "/root/rtbyte/src/lib/structures/ModEmbed.js", line 72, in ModEmbed.send
    return await this.modCase.user.send(this.modCase.moderator.id === this.client.user.id ?
  ?, in runMicrotasks
  File "/root/rtbyte/src/events/rtbyteGuildBanAdd.js", line 36, in async module.exports.run
    await embed.send();

Moderation case system

Implementation of a moderation case system, storing information on all moderator actions taken on a server. Current implementation can be seen here.

I think it would be interesting to improve on the implementation this time around, allowing for actions to be taken on specific cases after they've happened (such as reversing a ban by directly referencing the case). Possibly allow the user who had action taken against them to appeal it?

To note, this issue is only for the implementation of the case system itself as opposed to any commands or log events related to it.

This is dependent on #230.

Starboard not re-posting messages if it reaches the threshold, goes back under, and then reaches the threshold again.

Describe the bug
After a message has reached the starboard threshold and been added to the starboard, but it goes back under the threshold again, it can't be re-starred.

To Reproduce
Steps to reproduce the behavior:

  1. Send a message.
  2. Add stars until it reaches the threshold and is posted to the starboard.
  3. Remove stars so it goes under the threshold again, causing it to be removed from the starboard.
  4. Add stars so that it goes above the threshold again.

Expected behavior
The message should be re-added to the starboard as it has now reached the threshold again.

antiInvite doesn't trigger unless there is at least one invite link whitelisted

Expected behavior:

When filters.antiInvite is enabled and no invite links have been added to filters.inviteWhitelist, all invite links should be deleted.

Actual behavior:

When filters.antiInvite is enabled and no invite links have been added to filters.inviteWhitelist, the monitor triggers. After adding an invite link to filters.inviteWhitelist, the monitor triggers as normal.

DiscordAPIError: Cannot send messages to this user

Sentry Issue: RTBYTE-V

DiscordAPIError: Cannot send messages to this user
  File "/root/rtbyte/node_modules/discord.js/src/rest/RequestHandler.js", line 170, in RequestHandler.execute
    return reject(new DiscordAPIError(request.path, data, request.method, res.status));
  File "internal/process/task_queues.js", line 97, in processTicksAndRejections

This error has been appearing when starting the bot. I'd assume it's due to the guild initialization function checking to see if it's able to send messages to guild owners, but failing there. Would need testing.

- Rasmus

Emoji enlarging command

Essentially: take emoji as input => get source image which usually is a lot larger => return source image
Requested by 👑Jacket 👑#0001 in the Kinda Funny Discord.

Server log system

Much like the mod case system implementation from #231, we should implement a solution for generating server logs that doesn't rely on us creating a MessageEmbed for each feature that creates a server log message.

Should rely on types for;

  • adding things (embed color green, examples below)
    • Member joining
    • Role added
    • Custom command created
  • modifying things (embed color blue, examples below)
    • Message edits and deletions
    • Channel name changed
    • User's roles modified
  • removing things (embed color red, examples below)
    • Member leaving
    • Channel removed
    • Custom command deleted

Color system is based on the current implementation and if we can think up a better one that takes things such as moderation actions into account as well with distinct colors for different things, that would be great.

Possibly other types to be implemented as well? Unsure, let's discuss.

Timed mutes should display time until unmute

Expected behavior:

The embed footer should say User muted for X, with X displaying time until the unmute timestamp.

Actual behavior:

The embed footer says User muted until XXX, with X displaying Day Month Year, Time.

TypeError: Cannot read property 'id' of undefined

Sentry Issue: RTBYTE-G

TypeError: Cannot read property 'id' of undefined
  File "/root/rtbyte/src/commands/Management/logs.js", line 275, in module.exports.set
    if (value.id === logChannel) return msg.reject(msg.language.get('COMMAND_LOGS_SET_CHANNEL_SAMECHANNEL', value));
  ?, in runMicrotasks

TypeError: Cannot read property 'action' of undefined

Sentry Issue: RTBYTE-K

TypeError: Cannot read property 'action' of undefined
  File "/root/rtbyte/src/events/rtbyteGuildMemberUpdate.js", line 36, in module.exports.run
    if (logEntry.action === 'MEMBER_UPDATE') executor = logEntry ? logEntry.executor === member.user ? undefined : logEntry.executor : undefined;
  ?, in runMicrotasks

Provide more context to the user in guildMemberUpdate's role update log

Describe the feature you'd like to see.
Improve the way the guildMemberUpdate log for role updates shows the user information. Make it more context-based, instead of just providing a list of roles.

Additional context
For servers where users have a lot of roles, things might get "lost in translation". Possibly provide info on what role was added/removed?

Support for reaction roles

Describe the feature you'd like to see.
Allow users to join a server's joinable roles using reactions on a set message other than just the roles command series.

Blacklisted words aren't filtered when surrounded by a set of characters

A blacklisted word surrounded by any set of characters is not detected by the word blacklist as it splits the message content up word by word and matches a word against the word blacklist.

Possible fix would be to split the message content up character by character and matching a series of letters in succession against the word blacklist.

i18next implementation

Describe the feature you'd like to see.
An implementation of i18next, and using it instead of the default language feature in Klasa. This will make it easier to work with translations, as it follows methods that many translation websites do.

Additional context
N/A.

Starboard feature

Starboard feature, there should be an example version in klasa-pieces. Fully configurable and designed as per our standards.

Server- and userinfo embeds fail because of max field length

Urgent as bigger servers currently can't run serverinfo (tested on CC, AH)
Server- and userinfo embeds fail if the server has enough roles to (over)populate the list by hitting the max field length.

image

Possible solutions:

Solution 1: Limit it by showing the (10?) highest roles according to the role hierarchy.
Solution 2: Split the field before 1024 characters and add a second one if needed.

Bug: RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values may not be empty.

Sentry Issue: RTBYTE-H

RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values may not be empty.
  ?, in Array.map
  File "/root/rtbyte/src/events/rtbyteMessageUpdate.js", line 31, in module.exports.serverLog
    .addField(msg.language.get('GUILD_LOG_BEFORE'), truncate(old.content))
  File "/root/rtbyte/src/events/rtbyteMessageUpdate.js", line 21, in module.exports.run
    '{snip} s.get('channels.log') && msg.guild.settings.get('logs.events.messageUpdate') && old.content !== msg.content) await this.serverLog(old, msg);
  ?, in runMicrotasks
...
(5 additional frame(s) were not displayed)

Pinboard feature

Pinboard feature, much like the Pinboard not but configurable as per our standards

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.