Giter Club home page Giter Club logo

magibot's Introduction

maybeanerds mastodon profile

maybeanerd's GitHub stats

maybeanerd's most used languages

magibot's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar maybeanerd avatar renovate[bot] avatar snyk-bot avatar spthiel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

magibot's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • node 20.16.0
github-actions
.github/workflows/gitleaks.yml
  • actions/checkout v4
  • gitleaks/gitleaks-action v2
.github/workflows/linting.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/pr.yml
  • actions/checkout v4
.github/workflows/release.dev.yml
  • actions/checkout v4
  • docker/login-action v3
  • docker/metadata-action v5
.github/workflows/release.prod.yml
  • actions/checkout v4
  • docker/login-action v3
  • docker/metadata-action v5
npm
package.json
  • @discordjs/builders 1.8.2
  • @discordjs/rest 2.3.0
  • @discordjs/voice 0.17.0
  • axios 1.7.3
  • blapi 3.1.2
  • bufferutil 4.0.8
  • discord-api-types 0.37.93
  • discord.js 14.15.3
  • dotenv 16.4.5
  • fast-folder-size 2.2.0
  • ffmpeg-static 5.2.0
  • ffprobe 1.1.2
  • forever 4.0.3
  • libsodium-wrappers 0.7.14
  • mongoose 8.5.2
  • opusscript 0.1.1
  • statcord.js 3.4.3
  • tweetnacl 1.0.3
  • utf-8-validate 6.0.4
  • @types/centra 2.2.3
  • @types/ffprobe 1.1.8
  • @types/node 20.14.15
  • @typescript-eslint/eslint-plugin 7.18.0
  • @typescript-eslint/parser 7.18.0
  • eslint 8.57.0
  • eslint-config-airbnb-base 15.0.0
  • prettier 3.3.3
  • rimraf 6.0.1
  • typescript 5.4.5
  • @discordjs/opus 0.9.0
  • sodium 3.0.2
  • zlib-sync 0.1.9
  • node 20.16.0
nvm
.nvmrc
  • node 20.16.0

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>t0tproduction/configs/renovate/default)

Revive MagiBot Part 5: Define DB

MongoDB most likely allows for schema definitions (with TS!)
Change all DB tables to this, to make development quicker and DB more reliable

button bugs

  • buttons time out somehow? need to read docs more thoroughly
  • colors
  • end queue doesn't change message content (also remove all buttons!) (trying this atm)
  • remove unnecessary logs

Add license

Add an OSS license, e.g. MIT or GPL so that contributions are correctly licensed

Discord.js v 13 update: Add Buttons

discord has a new bot feature called buttons. I want to use them for interactions I used emotes up until now, e.g. approving/denying things, joining the queue, etc.
Things like voting should probably keep using emotes, as having 20 buttons next to each other isn't really nice. On the other hand, they might still be better than 20 emotes. This is something that will need testing.

update dependencies

  • update node.js on webserver, in dependencies (typings) and in CI to 14
  • update all other dependencies to most current versions after that worked

Feat: public documentation

most large bots have their own website
idk If i really want that, maybe having a github wiki is a good way, but i definitely want to document how the bot should be used outside of the help command

replace "forever" with pm2

currently, to keep the magibot process running 24/7 even if for some reason it crashes, we use forever
its not being actively maintained well anymore, and they suggest switching to an alternative

https://pm2.keymetrics.io/ looks like a good option imo

Prepare 3.2.0 release

Some things are still TODO:

  • go through permissions to see what the bot still needs and adjust invite codes accordingly
  • Test permission by adding bot using new invite
  • Check If "thanks for adding me" message is still sent to guild owners
  • maybe create a VM on GoogleCloud instead of using AppEngine which might kill instances?
  • revert a few GCloud things like /tmp and the yamls

Final Command Testing

  • /ping
  • /roll
  • /invite
  • /bugreport
    issues: components in interactionConfirmation seem to be broken somehow
  • /randomfact
  • /salt
  • /profile
  • /info
  • /help
  • /vote
  • /queue
  • /admin salt
  • /admin config
  • /admin joinsound
    left: joinsound set
  • /joinsound
    failing: set, using URLs: not playing when connecting

Errors found

  • joinsound set soundfile somehow failing

Followup

Rebase old commits

Rebase old commits e.g. before v 3.0 to clean up history so that we can go Open Source without fearing for pushed tokens or similar stuff

Bug: Statcord custom stats are currently not compatible with sharding

image

essentially, the shards track the usage in their own instance of the code, and statcord does not post that data. We need some way to share this data with the shard manager. I don't want to add something like redis or similar, so maybe I can add the stats to the shards and get their info via a fetchFromAllShards kind of call..

Ongoing queues that shouldnt be?

Looks like there are some cases where e.g. deleted channels break the Queue end command and stop the creation of any new queues

Screenshot_2023-02-18-12-38-17-97_572064f74bd5f9fa804b05334aa4f912.jpg

Screenshot_2023-02-18-12-37-27-47_572064f74bd5f9fa804b05334aa4f912.jpg

User/server data is unwillingly being deleted

could verify the bug that some user data is removed
im guessing this is due to shards handing server around between themselves and my old logic thinking they kicked the bot, which results in us removing their data after a week or so

Feat: stay in voice Channels instead of leaving

User request:

Hey is it possible to keep the bot in the voice channel it plays join sounds in so that you don’t hear the discord join/leave notification sounds before and after the music? Similar to how a music bot functions. If not this seems like a feature that would be easy to add and would really make the join sound experience better overall without all those notification sounds cluttering up the channel with extra noise

In general I think this would work against magibot joining any channel at any time, but maybe it could stay in a channel until it's needed elsewhere? That would minimize the discord related joinsounds, while still keeping all abilities.

Revive MagiBot Part 4 : joinsound additions

  • allow admins to set joinsounds for others
  • allow default user joinsound
  • allow default server joinsound

bugs:

  • bot doesn't wait for voice connection to play sound? or maybe my connection just takes too long (the latter is the case. that's ok I guess.)

Feat: setup message to guild instead of owners DMs

currently the bot sends a DM to the owner of the server it is joining.
in general it would be nicer to choose the "welcome" text channel and post it there, as many times the owner is not actually the person who added the bot.

Feat: print prefix on mention

When the bot is mentioned without any command, it should print the currently configured prefix of that guild.
This is to make sure nobody can ever "lose" access to the bot

Feat: Refactor Code

  • Replace indentation with tabs

  • Flatten indentation stacks

  • Fix variable naming

Feat: command to activate joinsounds in all channels

  • should activate JS in all channels of a guild
  • should probably also be able to deactivate JS for all channels
  • I don't want to hardcode all channel IDs into the DB, this needs to be some sort of syntax that tells the bot that all channels are allowed, even if they are added to the guild after this command was used

Accidental deletions

We might be deleting data accidentally for users where the server isnt very active
Double check deletion, maybe move from 7 days to 6 months or something

Add back stat posting to botlists

Currently, the docker swarm instances do not get botlist tokens.

I would want to activate that again, either by supplying them as before via a json e.g. in a docker volume, or by adding env vars?

Feat: filter out discord invites

Add an option to disallow users from sending discord invite links
this should probably allow for a list of roles or channels that are excluded

fix release pipeline

The rename of my account broke the image release, so it needs to he adjusted

Maybe we can even do it similarly to crab?

Feat: votes enhancements

  • ending a vote of a specific message early would be nice, so that e.g. if the majority already voted, you can make it official
  • make date more beautiful
  • add ranking in the end
  • add option to not remove reactions

Rework/Re-add queue automatic muting

Rework Queue System muting

muting

  • remove muting?
    • have some sort of migration period where we still keep unmuteling users
  • let muting still work, but with channel permissions?
  • Check if staging channel should change any of the behavior, do they have commands to put someone on stage? Then that should be done instead of muting/unmuting when its a staging channel

new/adjusted features

  • DONE #276 as part of this?
  • DONE another feature that sounded nice: the ability to prolong the length of the queue
    • maybe only usable <15mins before the end of the queue, so that it's not used without reason
    • maybe a limit on how often it can be used

Feat: joinsounds enhanced

  • allow admins to set sounds for any user
  • allow admins to set "master" sound which plays for everyone

Feat: Allow toggling of features

Not everyone wants every feature activated.
add the possibility to enable/disable features for guilds.
This could be already included in a kind of "deactivated" default state for every feature, but it could also be actively chosen.
IDK what is better yet, easier is probably the first version

Discord.js v 13 update: Add Slash commands

Discord has a new system to add commands: slash commands
I think in general it would be good to have slash commands for every command the bot currently has. We'll see if it wouldn't work for some.
We should probably still keep the old command structure as many people are simply used to it, but they should essentially call the same code as slash commands

commands to move:

  • roll
  • ping
  • invite
  • bugreport
  • rfact
  • salt
  • profile
  • sound
  • store joinsounds on disk
  • allow URLs to be passed as well
  • handle errors like not enough space etc. correctly
  • make magibot disconnect if it encounters errors during trying to play a sound
  • evaluate the option to see storage used, and maybe clear all sounds? (as part of profile e.g.? maybe profile can be a command to only get your own profile)
  • add an activate sounds everywhere command that resets joinsound voice channels
  • make joinsound setting also look at the size of the sound when calculating the limit
  • stats
  • info
  • vote
  • test permissions needed to update message
  • rewrite vote to use interactions -> we cant use button interactions, but we need to make sure we have the permissions we need.
  • help
  • hide admin commands for non admins -> remove admin roles altogether
  • test if this actually worked after discord had some time to sync the permissions
  • find out where I needed admin elsewhere - rework!
  • only place we needed isAdmin: queue next/stop buttons. probably best to just make them commands and potentially even remove the buttons from the queue message
  • store joinsound names (e.g. via filename = url.substring(url.lastIndexOf("/")) ) to show them in the overview
  • create a Help command that lists commands, maybe by category, and gives a short overview
  • move queue command away from admin?

admin commands to move:

  • salt
  • sound
  • update
  • queue
  • setup

Another big topic that needs to be done

  • adjust Migration Message to tell users application commands need to be activated if the bot doesn't have permission -> can't seem to be able to check I the bot does

Potential bugs to fix:

  • a:queue doesn't send the "use application commands" message for some reason
  • add a char Limit to joinsound Titles (e.g. 30)

General Bugs after update to v13

bugs we found during testing:

  • k.salt add nickname fails (i assume the entire logic to find users by nickname is at fault here)

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.