Giter Site home page Giter Site logo

kiyomi's Introduction


Kiyomi
Kiyomi ๐ŸฆŠ

MIT license Invite Kiyomi Python 3.9

Overview

Discord bot that has various functionality related to Beat Saber ๐Ÿ’œ
Watching your Beat Saber activity very closely ๐Ÿ‘€
Measures your Score Saber PP everyday ๐Ÿ“

Install dependencies

# Install requirements  
python3 -m pip install -r requirements.txt  

Starting Kiyomi

rename example.config.json to config.json and fill in your configuration details.

# Run database migrations
alembic upgrade head

# Start bot  
python3 Kiyomi.py

Lint

# Run pylint
pylint Kiyomi.py src

Code formatter

pip install black
python -m black ./Kiyomi.py ./src

Generate alembic migration

alembic revision --autogenerate -m "Change message"

kiyomi's People

Contributors

dependabot[bot] avatar lucker- avatar patthehyruler avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

lucker-

kiyomi's Issues

Fix interaction defer

Almost all commands need to defer when responding.
Need to figure out how to respond to deferred messages.

Twitch integration

There are 2 goals for this:

  • Twitch notifications when someone goes live.
  • VOD timestamps for score feed.

Feature idea: Mapper feed

Register mappers to get notifications in a Discord channel when they upload a map to Beatsaver.
Also maybe add some sort of playlist generation feature?

Move the API into a package

This should remove some unnecessary complexity that has slowly crept into the project.
The best couse for this would be to make a github group and move the BSBot into the newly created github group. After that we would make a new repo for each of the API's we are using (Score Saber, Beat Saver, etc...). We can generate and upload packages to https://pypi.org/ and add them back to the BSBot project,

Replace logging system

The current logging system is not very friendly with the testing framework. It likes to create log files everywhere and isnt very flexible.

Haven't decided on a framwork to use or anything yet.

Rename project

The project should be renamed to Kiyomi we should also change the references to BSBot inside the code accordingly.

I already change the offical bots discord username, but we still need to get the profile pic finished and write something for the description. Theres probably more stuff besides those that need to be changed accordingly but i cant recall everything from the top of my head. Just check the discord developer panel or whatever for the rest of the info that needs to be changed or filled.

Better error handling for roles

Task exception was never retrieved
future: <Task finished name='Task-4' coro=<Loop._loop() done, defined at /home/kiyomi/Kiyomi/venv/lib/python3.9/>
Traceback (most recent call last):
  File "/home/kiyomi/Kiyomi/venv/lib/python3.9/site-packages/discord/ext/tasks/__init__.py", line 125, in _loop
    raise exc
  File "/home/kiyomi/Kiyomi/venv/lib/python3.9/site-packages/discord/ext/tasks/__init__.py", line 101, in _loop
    await self.coro(*args, **kwargs)
  File "/home/kiyomi/Kiyomi/src/utils.py", line 19, in wrapper
    res = await func(self, *args, **kwargs)
  File "/home/kiyomi/Kiyomi/src/utils.py", line 35, in wrapper
    return await func(self, *args, **kwargs)
  File "/home/kiyomi/Kiyomi/src/utils.py", line 81, in wrapper
    result = await func(self, *args, **kwargs)
  File "/home/kiyomi/Kiyomi/src/cogs/achievement_roles/tasks.py", line 37, in update_member_roles
    await self.update_member_pp_roles(guild_member)
  File "/home/kiyomi/Kiyomi/src/cogs/achievement_roles/tasks.py", line 66, in update_member_pp_roles
    await self.remove_member_role(guild_member.guild_id, guild_member.member_id, remove_role_member)
  File "/home/kiyomi/Kiyomi/src/cogs/achievement_roles/tasks.py", line 86, in remove_member_role
    await general.remove_role_from_member(
  File "/home/kiyomi/Kiyomi/src/cogs/general/general_api.py", line 46, in remove_role_from_member
    await self.actions.remove_role_from_member(guild_id, member_id, role_id, reason)
  File "/home/kiyomi/Kiyomi/src/cogs/general/actions.py", line 129, in remove_role_from_member
    discord_role = await self.get_discord_role(guild_id, role_id)
  File "/home/kiyomi/Kiyomi/src/cogs/general/actions.py", line 55, in get_discord_role
    raise RoleNotFoundException(f"Could not find role with id {role_id} in guild {discord_guild.name}")
src.cogs.general.errors.RoleNotFoundException: Could not find role with id 9 in guild Smugle Stick

Verify command permissions

We should make permission tiers for the bot to simplify things.

Tiers:

  1. Regular user
  2. Server admin/moderator
  3. server owner
  4. Bot owner

Emote framework cog

This cog will manage the available emotes for the bot to use.

Commands:

  • !emote enable <discord.Emote>
    Will enable the emotes use within the bot

  • !emote disable <discord.Emote>
    Will disable the emotes use within the bot

  • !emoji
    Display random emote from the enabled emotes list

API Commands:

  • get_emoji(":peepoHappy:")
    This will return an emoji that can be used in the bots messages and embeds.
    If an emote is unavailable then return a default placeholder emoji instead,":x:" for example.

Add missing API calls

There are a bunch of unimplemented API calls for Score Saber and other API's that we are using.

Would be cool to have those someday

PP roles feature is still broken

Roles don't seem to update when people pass a PP milestone.
Also, we should probably make sure that when people lose PP and fall below a milestone, their roles get updated accordingly.

Add option to restrict which scores get sent to the notification feed

Potential feature idea:
Set a restriction for which scores get sent to the notification feed.
For example, only scores that are in the global top 100 or only scores that are in the player's top 50 scores etc.

This would be an optional setting per discord server.
(The default would still be all scores.)

Move Discord token into a json config file

``It's a bit annoying to have to export the Discord token every time.
Make sure to also include the config.json file in .gitignore

The config can look something like this:
{ "discord_token": "<YOUR DISCORD TOKEN HERE>" }

Add support for guild emojis

Currently kiyomi supports reposting emojis only on the global scale.
For example: You add emoji on Guild1 and kiyomi will be able to repost that in every guild.
This change would allow for global + local emojies.
Local emojis can be added by the Guiild admins.

Commands:
!emoji enable global
!emoji enable local

If you have any better ideas what the commands should look like, then feel free to change that.

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.