Giter Club home page Giter Club logo

miso-bot's Introduction

noai

License Code style: black Codacy Badge DeepSource Discord Sponsor


Miso Bot

Miso is a multipurpose Discord bot with over 100 commands and features.

For more information and command reference, visit https://misobot.xyz

Development

A Nix development shell is included, using devenv

This environment installs poetry and some useful packages.

nix develop --impure

The dependencies are managed using Poetry

poetry install

Copy/rename .env.example to .env and fill the api keys you need, most importantly the discord bot token. The bot can then be run with

poetry run python main.py
# or in dev mode
poetry run python main.py dev

# if using the nix shell:

run
# or in dev mode
run dev

but it will not function without a MariaDB database. The database can be bootstrapped with

docker compose up db -d

After which the bot can be ran and easily developed. When you're done, remember to shut down the database container:

docker compose down

Contributing

Your pull requests are welcome, as long as they meet the enforced code standards:

The nix shell installs these as pre-commit hook automatically.

Deployment

First copy/rename .env.example to .env and fill it with your own keys. Everything else should be handled by the dockerfile.

docker compose --profile prod up

The docker compose file bootstraps the entire miso infrastructure, including prometheus metrics, grafana dashboards and nginx reverse proxy.

You likely don't want these if you're just running the bot.

The compose file is using different profiles that start only a handful of containers: dev, dev-extra and prod. prod starts everything, as you might have guessed. dev starts only the db and the bot in debug mode, for fast testing. dev-extra starts extra services used by some commands, but not the infra containers.

docker compose --profile dev up
docker compose --profile dev-extra up

Star History

Star History Chart

Contributor wall

Contributors

miso-bot's People

Contributors

codacy-badger avatar deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar joinemm avatar kammet07 avatar keyruu avatar muggs-cant-code avatar sourcery-ai-bot avatar zackhart1 avatar zackhart2400 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

miso-bot's Issues

>fm last (week/month/year) command doesn't work

When running the command you get the error: " AttributeError: 'NoneType' object has no attribute 'find'", I'm guessing it's because Last.FM changed the report cards. Will this issue be fixed?

Creation of colorchart doesn't work because of last.fm API bug

Hello,

I'm posting this on behalf of a user of your bot:

I came across this issue on the last.fm support forum: Colorchart of Misobot doesn't work

I saw in lastfm.py#L777 that you are loading 1000 top albums of a user from the last.fm API. However, there is a bug in the last.fm API. If the limit is greater than 500, album art URLs will not be returned.

If you set the limit to 500, your colorchart function should work again.

Best regards,
Christian

>fm artist toptracks and >fm artist topalbums not working

been getting an attribute error every time i try to find the top tracks or albums of a specific artist.

AttributeError: 'NoneType' object has no attribute 'find'

stopped working between the 20th and the 25th, if that helps with debugging

>ig <url> not working

The command to get images from Instagram hasn't been working recently (~1 maybe 2 weeks).

Command:
>ig https://www.instagram.com/p/CQ6cbyms8N5/?utm_source=ig_web_copy_link
Returns:
:no_entry: ClientHttpProxyError: 407, message='Proxy Authentication Required', url=URL('http://Seljoonas:[email protected]:45785')

Bot blocked

Bot has been blocked by IG it shows a the message saying that miso has been blocked from accessing IG contents

music

probably add music command too

[Bug] >opgg profile na

When using the command >opgg profile na {summonerName} (I entered various summoner names to test), I get the following result:

":no_entry: AttributeError: 'NoneType' object has no attribute 'text'"

>fm chart recent command doesn't work

Whanever I type the command, for instance >fm chart recent 15, a message shows up that says:

"HTML Rendering error: Unable to connect to the HTML Rendering server"

Could you please fix this?

Move to /slash commands

Things will apparently stop working soon - happy to help with this but need to know where to start

Prefix

Any possible chance there will be a command implemented that allows a server to change the prefix of the bot? > is too common.

Implement caching media embed requests

Implement caching for:

  • Instagram
  • Twitter
  • Reddit

Tiktok may not be possible due to short lifetime of the media url.

This would reduce the amount of requests we need to make and improve response time for popular posts

YouTube command fails

Whenever the YouTube command is used the bot just returns TypeError: 'NoneType' object is not iterable error. After some research I think this might be caused by urls not being populated correctly in line 154 of /cogs/media.py

allow colon notation [HH:mm:ss] for remindme command [enhancement]

image

Proposed solution in util.py:

def timefromstring(s):
    """
    :param s : String to parse time from
    :returns : Time in seconds
    """
    s = s.removeprefix("for")
    
    # reduce colon notation to hms notation
    if ':' in s:
        # if only one colon, assume Xm:Xs
        if s.count(':') == 1:
            s = f"0:{s}"
        s = s.replace(":", "h", 1).replace(":", "m", 1) + "s"
        
    return int(Duration(s).to_seconds())

I don't have write access so I can't create the edit myself, nor can I add the "enhancement" tag to this post, apparently. (This is my first time posting an issue on a repo I don't own so this is a bit confusing for me.)

Instagram command

Instagram saying it's proxy has an error and authentication is required

Word Cloud not working

I was installed MisoBot, but WordCloud is can't use.
Why?
Bot said, "WordCloud is disabled!"
I don't know how to enable wordcloud.

Starboard chaining

Currently the bot can create new starboard events if a previous message sent by the bot gets enough stars. This not only creates a weird message as embeds aren't quoted properly, but also creates the opportunity for abuse cluttering up the starboard. This is especially a problem in small servers where everyone has basically equal roles and few members so the star count is also low.

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.