GithubHelp home page GithubHelp logo

hydractify / kanna_kobayashi Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 3.0 2.63 MB

Kanna Kobayashi's open source repository (Discord Bot)

Home Page: https://hydractify.org

License: GNU General Public License v3.0

TypeScript 99.65% JavaScript 0.35%
discord discord-js weeaboo kanna nodejs dragon kobayashi-san typescript anime bot

kanna_kobayashi's Introduction

Introduction

This is a Discord application for experimenting ideas on and serve our community needs.

Requirements

Getting started

Firstly what you want to do is clone this repository:

git clone https://github.com/Hydractify/hydractify.git

From here you will configure the application with config.toml, you can use config.example.toml as a reference. Here you will set:

  • The application's token (token);
  • The database URL (database_url), i.e. postgres://username:password@localhost/database_name;
  • Module configuration.

Once that's done, you need to install diesel_cli for automatically generating typings and running our SQL to make sure all tables are configured. You can install it through cargo:

cargo install diesel_cli --no-default-features --features postgres

Once that's done, ensure it's binary in your $PATH then run:

diesel migration run

Now you can just run the application! If you're not familiar with Rust, you can run it through your terminal with:

cargo run

Modules

Self Role

This module is configured via [self_roles] in config.toml, which has two fields:

  1. enabled
    • Whether the module is enabled or not. The commands are still registered, maybe they shouldn't.
  2. channel_id
    • The ID of the channel where the self role message should be deployed.

When enabled and the message is deployed then when a Discord user interacts with the module they will have that certain role added to them or removed.

Slash commands

To configure and manage the message with the self assignable roles you must use the /selfrole slash commands, these being:

  1. /selfrole show
    • Lists the registered self assignable roles.
  2. /selfrole deploy
    • Deploys the message with the self assignable roles, optionally receiving a message ID to edit an existing one.
  3. /selfrole cleanup
    • Removes from the list all roles that have been deleted.
  4. /selfrole remove
    • Removes a specific role from the self assignable role list.
  5. /selfrole add
    • Adds a specific role into the self assignable role list.

Starboard

This module is configured via [starboard] in config.toml, which has four fields:

  1. enabled
    • Whether the module is enabled or not.
  2. channel
    • The channel that starboard messages should go to.
  3. emojis
    • An array containing the emotes that trigger a starboard message, these can be an UTF-8 character like โญ or a custom emote like <a:a_kirbyStar:894087344909606912>.
  4. threshold
    • How many emotes are needed to trigger a starboard message.

Special thanks

This implementation is heavily based off of etternabot, it was a great starting point for me to understand how poise and serenity work!

kanna_kobayashi's People

Contributors

dependabot[bot] avatar fyko avatar spaceeec avatar wizardlink avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

kanna_kobayashi's Issues

Command Parsing Enhancements

All commands presented here should get better parsing or functionality when parsing


EmojiCommand / Role / User

  • Show more than a single result

User case we have to first see if it would be a good thing to implement, and if so, when finding an exact match, not showing the other matches.


WeebCommand

  • space parsing to or, , and parsing (Like done in the choose command a963e29)

More commands and the respective tasks will be added over time.

Revise all the commands

Go through all the commands revising and refactoring if needed.

  • Common
  • Fun *
  • Info
  • Interactive
  • Meme
  • Mod
  • Patreon
  • Quiz
  • Settings
  • Unique
  • User

* Waiting for other major changes

[Feature] Weekly

Use

User gets one Dragon Scale multiplied with their patreon tier, can be only used once a week.

Users who did not upvote Kanna on discordbots.org cannot use the weekly command

[Feature] Gamble

Use

Without arguments it tells you to put a number of coins to gamble.

Get the user's coins and get a random percentage, from 0 to 100, less than 60 you lose all your money, 60-79 you get 1.5 of your current currency, 80-99 you get 2x, and 100 you get 5x

For Patreon Tier

The chance to get a better gamble is better, basically we get the patreon tier and we multiply by 2 and add to the percentage (Once we get more patreons that may change)

Remove Vote Locking

This Issue requires the merge of the vote branch

What is the vote locking going to be substituted for

  • Daily boosts on profitable commands (not tier increase)
  • DailyCommand
  • WeeklyCommand
  • GambleCommand
  • CatchCommand
Name Old Values New Values
Gamble Random * 10 0 Random * 100 + 5
Daily 200 214
Weekly 1 Scale Bug / Scale*
Catch 1 to 6 bugs 2 to 8 bugs

* = When hitting the "jackpot", getting a scale, else the range goes to a max of 20

It could also be nice having some kind of streak bonuses for those.

[Enchancement] Remake the Market

Command

Paginate the existing items and badges and make it able to see the information of each item or badge on that list, when you look the info, have the option to buy it if it is buyable, or to sell if it sellable

Dragon Scale i am thinking of making it unbayable but sellable, so we make a special market for it (It can be really neat as we could make global events with that market and attract more grinders)

Obs: I think we should separate Items from Badges, without args be items as most look for that, or make it toggable with a reaction

Items

Have detailed descriptions about them, a.k.a. what it is for (if there is any use of course)

Show which command they interact with if they do (I am planning to make some items to work on commands), maybe we can add that later if you want

Badges

Make them buyable after the user met a certain quota, we can literally make it function based (and will save a lot of time tbh

[Feature] Self Roles

Use

People with permission level 2 will be able to add and remove roles from the self roles command, which anyone with any permission level can use the command to get a role.

We should use pagination to show these roles, if there's only one page, no arrow reactions.

To choose roles i think we should either use reactions like, 0-5, so we limit roles per page, or let the user write the number himself, so we could do something nice like, he writes "1 + 2" it gives the first role and the second, or we could simply limit to 10 reactions, so he can get all 5 roles and remove all 5 if he want as well.

For adding or removing roles from the list we could use flags o3o

[BUG HUNT] - Misspelling

In K!help there is kanna guildinfo on the second page it says k!guilinfo instead of k!guildinfo.

[BUG HUNT] - DoIt command has invalid usage

Screen Shot 2019-11-05 at 21 06 46

I did k!help and on page 3 it said kanna doit for the k!dance comment

  1. I typed k!help
  2. Then pressed on the arrow 2 times
  3. Then i saw "Kanna doit" above the k!dance command.

-Digit!#5125

[WIP] Dragon Scale

Special Market

Every item that has a rarity above Dragon Scale's rarity is bought with Dragon Scales, the amount of coins the item costs will be the amount of Dragon Scales it costs, every Dragon Scale costs 1000 coins.

Obs: Everything up from Dragon's Scale rarity should not be listed on common market

stats re-implementation

The stats command needs to be re-implemented in the dev/v5 branch for the interactions update.

This is how it looks like:
image

The color of the embed at this moment may be random - but later down the line it should probably behave as it does in v4.

lookup re-implementation

The stats command needs to be re-implemented in the dev/v5 branch for the interactions update.

This is how it looks like:
image

The color of the embed at this moment may be random - but later down the line it should probably behave as it does in v4.

[BUG HUNT] - Lookup command showing wrong guild

Screen Shot 2019-11-05 at 21 42 42

Screen Shot 2019-11-05 at 21 49 03

Guild Info

What went wrong

I tried to lookup The Dragon Maid Cult with k!lookup but it only showed info over the server i was using.

Reproducing the bug

  1. I typed kanna lookup
  2. Put the invite code after it
  3. It didn't show info over the server only the one i was in.

[BUG HUNT] 'error' spelt as 'errror' when an error occurs

What went wrong

The word 'error' is spelt as 'errror' in the error message.

Reproducing the bug

  1. I did 'kanna anime Dr. Stone'
  2. Then, kanna replied with the error message, where I saw 'error' spelt wrong as 'errror', with three 'r's.

image
image

[BUG HUNT] Wrong command

Information

v4.5.1

Kanna Kobayashi

Screen Shot 2019-11-07 at 18 54 40

What went wrong

I typed "k!help avatar" and it said kanna image between aliases when kanna image is a whole different command.

Reproducing the bug

  1. I typed "k!help avatar"
  2. It said "kanna image" between aliases

-Digit#5125

[WIP] Patreon

Tier

Every one dollar donated the user should have plus patreon tier, aside from 1$, it'll give 2

Acess to some special commands for patreons

Unique category on help command, to well, attract users to pledge

On Daily we get that amount of coins and multiply by their Tier, same goes for Weekly

Obs: more stuff will come on future, but Patreon Tier is vital for it

[BUG HUNT] choice command splits at `or` while being part of a word

Information

v4.5.1

Kanna Kobayashi

[Guild Info]Screen Shot 2019-11-06 at 16 29 33

What went wrong

I was trying to use the command k!choice for k!choice memory or forgot and it gave me the answer y instead of the word memory itself.

Reproducing the bug

  1. I typed "k!choice memory or forgot"

-Digit#5125

[PROJECTS] React Command

How it should work

User:

  • kanna react hi

Pseudo Code:

const lastMessage = message.member.lastMessage; // This is just pseudo, we will check for the message above the user's message if an ID was not given
lastMessage.react(); // Returns Promise<MessageReaction>(https://thigh-highs.are-pretty.sexy/80fc4a.png)

[BUG HUNT] sayd errors out when prematurely deleting the message

What went wrong

I deleted my message before kanna could when using 'kanna sayd', therefore making kanna produce an error message.

Reproducing the bug

  1. I wrote 'kanna sayd hello'
  2. Then I immediately deleted my message saying 'kanna sayd hello', before kanna could.
    image
    image

[BUG HUNT] - osuuser command has wrong command name in usage

Screen Shot 2019-11-05 at 21 30 03

Screen Shot 2019-11-05 at 21 30 14

## What went wrong

I was trying to lookup my osu user but k!osucommand did not work but k!osuuser did work.

  1. I looked in k!help
  2. Tried to use k!osucommand
  3. It didn't work
  4. Tried k!osuuser and it did work

-Digit#5125
[edit] k!help osucommand said osu command didnt exist.
Screen Shot 2019-11-05 at 21 37 24

[PROJECTS] Osu! Lookup

Command with multiple methods reaching the respective endpoints:

Wiki

User

  1. /api/get_user
    • Get general information of a user
  2. /api/get_user_best
    • Get user's best scores
  3. /api/get_user_recent
    • Get user recent games

Beatmap

  1. /api/get_beatmaps
    • Get information on a beatmap
  2. /api/get_scores
    • Get top 10 of the beatmap (Combined with first item)

Ninja edit:
Current progress can be found here.

[PROJECTS] D&D Lookup

THIS IS A VERY COMPLICATED ONE

i am not kidding

So this will probably be one of the hardest commands planned and maybe will require me and space working on it instead of only one of us.

What is the purpose?

  1. Get info in a spell, equipment, class, etc.
  2. Get specific info of a character on a specific level on a specific class (There is an endpoint for that don't worry)

This is just the top of the iceberg, we should add all endpoints listed on http://www.dnd5eapi.co/docs/

Obs: this Issue will serve as a tracker for what we do

Add an activity to Kanna upon the client getting ready

For a while we have been manually adding her activity whenever she'd restart, but the fact is that we don't know if the activity on other shards have disappeared. Nonetheless, this process should not be made manually, instead done when she restarts.

[Feature] Leaderboard

Use

With Arguments Without Arguments
Top 30 Top 30 on level
everything listed on the ProfileCommand that is possible to enumerate maybe make it possible to see their profiles (could be really neat)

Basically if you use the command with arguments you can choose to see how much dragon scale, coins, level, etc.

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.