Coder Social home page Coder Social logo

toxicmushroom / melijn Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 24.0 18.57 MB

A powerful multi-purpose discord bot

Home Page: https://melijn.com/

License: MIT License

Kotlin 99.98% Dockerfile 0.02%
bot discord discord-bot discord-bots jda jda-bot jda-discord-bot

melijn's Introduction

Melijn - being rewritten here https://github.com/Melijn/melijn-bot

Codacy Badge Discord Bots Discord Bots FOSSA Status

Bots for Discord Discord Boats

forthebadge

If you want to use code from Melijn you have to credit me and all our contributors. Contact me on discord for more information #1

(I do not support changing the source code nor helping to build the source code.)

How to self-host using docker

  1. Copy example-docker-compose.yml to docker-compose.yml
  2. Copy example-postgres.env to postgres.env
  3. Copy example.env to .env
  4. Uncomment one of the volumes in the melijn-postgres service for persistant storage
  5. Make sure all the passwords, usernames and database names match between your .env file and the postgres and redis services
  6. Fill in all the fields you can in .env, bot token, id, name, etc... (If you don't have tokens for spotify ect then don't expect commands related to spotify to work)

These 2 steps are optional (see notes) 7. You can build your own image from the source-code using sudo docker build -t username/melijn:version . 8. Replace toxicmushroom/Melijn:version in docker-compose.yml with your username/melijn:version

  1. Start docker compose with sudo docker-compose up -d (Make sure you're in the same folder as docker-compose.yml)

NOTES:

  • username/melijn:version can be replaced by eg. ShadowGamer/melijn:v1
  • if you want to use your image you built on another machine then read the docker docs about docker login and docker push (you can publish images for free on https://hub.docker.com/)
  • You can also skip steps 7 and 8 and checkout what the latest tag is on https://hub.docker.com/r/toxicmushroom/melijn (currently this is toxicmushroom/melijn:14e88d3ab1afe5bba3d7442488a768f13e3e0077). Make sure to replace the example tag in the docker-compose.yml with the latest tag.

Note. If required you can copy this environment folder anywhere your like, rename it, ect. Be aware that this contains the login information to the local postgres storage which might hold user data collected from your discord server by melijn. You should never share your environment with others.

License

FOSSA Status

melijn's People

Contributors

codixer avatar dependabot-preview[bot] avatar duncte123 avatar fossabot avatar hetyoshiteam avatar shermarvdh avatar tibostans avatar toxicmushroom avatar wardgr avatar zeroeightysix 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

Watchers

 avatar  avatar  avatar

melijn's Issues

panel login time out

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
After I want to log in with discord, the time out screen from cloudflare appears.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot_20240103_010508_Chrome

Screenshot:

Smartphone (please complete the following information):

  • Device: [Samsung Galaxy S22]
  • OS: [Android 14 ]
  • Browser [Chrome]
  • Version [120]

Additional context
Add any other context about the problem here.

Sharpen command on svg causes crash after some timespan

Describe the bug
After using the sharpen command melijn will consistently use a lot of CPU, after a while, all threads will be unresponsive and melijn will become 'dead'

To Reproduce
Steps to reproduce the behaviour:

  1. sharpen :emoji:

  2. wait some time

Expected behaviour
The image manipulation handles everything properly

Additional context
Thread dump: https://cdn.discordapp.com/attachments/642872575872991262/761647260554493952/dump_melijn_1
Thread dump overview: https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjAvMTAvMi8tLWR1bXBfbWVsaWpuXzEtLTE3LTU0LTM3&

Anti-spam

Is your feature request related to a problem? Please describe.
As of late, user accounts have seemingly been compromised, and started spamming scam Steam links. In smaller communities with fewer administrators, it's difficult to moderate these incidents at all times.

Describe the solution you'd like
I propose that Melijn should detect these incidents (if a user has posted the same message in 3 or more channels) and automatically kick these users, as well as posting a message in a relevant channel (i.e. moderator-only bot channel) to make moderators aware that a potentially compromised account was kicked for spam.

Describe alternatives you've considered
There is the possibility of detecting the scam links themselves, but these scam links are often not the same between messages.

Verification

"Simply" add the verification features of Melijn bots atm to the rewrite in kotlin, there is room for improvement and reaction verification should be a thing (as requested)

Additional context
https://melijn.com/commands/
This includes the commands

  • antiRaid
  • setVerificationType
  • setVerificationCode
  • setVerificationEmoteji

The following commands are/.will be replaced by others (Just ignore these features)

  • setVerificationChannel -> setChannel verification
  • setUnverifiedRole -> setRole unverified
  • setUnverifiedThreshold -> something

Add a search option for games using IGDB

Is your feature request related to a problem? Please describe.

Add a games search option to meljin - and use IGDB since their API is free with no restrictions on data licensing compared to mobygames and the like. There are multiple ways to consume the api and there is already a reference bot that does so.

Describe the solution you'd like

s!igdb <search term> brings up a card with info on the search term.
Describe alternatives you've considered

Some bots offer a Steam search option, but it doesn't include console games or games only available by physical copy or through GOG/EGS/Itch/etc.

Currently the bot hosted in their server is only available there. I don't trust myself to self host the reference bot in a secure way.

Additional context
image
image

NPE QueueCommand

Steps to reproduce are unknown

line 46 contains totalDuration += track.duration, track is most likely null

Stacktrace:
java.lang.NullPointerException
at me.melijn.melijnbot.commands.music.QueueCommand.execute(QueueCommand.kt:46)
at me.melijn.melijnbot.commands.music.QueueCommand$execute$1.invokeSuspend(QueueCommand.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

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.