Code Monkey home page Code Monkey logo

saki's Introduction

Saki

Discord Subreddit subscribers
Open on gitpod https://gitpod.io/from-referrer/

This repository contains the source code for the custom bot for the Gimai Seikatsu Discord Server. This is a Typescript port of the original bots written in Java by Look.

The bot is fully based on slash commands. For a complete list of commands, use /help command.

The bot isn't available publicly to other servers. You can see the hosted one in the Gimai Seikatsu Discord server or self host it.

Links

Discord: https://discord.gg/WQspAHcJHB
Subreddit: r/GimaiSeikatsu
Fandom: Gimai Seikatsu Fandom

Bot Information

Language: Typescript
Library: Discord.js V14

Contribution

For new feature requests, you can make an issue and i'll see what can be done.

  1. Fork it
  2. Create new branch git checkout -b my-new-feature
  3. Commit changes git commit -m "Add cool feature"
  4. Push changes to it git push <remote> <branch>
  5. Create a pull request

Any and all contributions are welcome. Please make sure you're code passes the CI. โœŒ

Self-Hosting

It is pretty easy to self host the bot. It should take around 5-10 minutes to do it if you know what you're doing.

Requirements:

First clone the repostiory with git.

$ git clone https://github.com/Yakiyo/saki

Then create a file named .env and populate it like the following

DISCORD_TOKEN=<Bot token goes here>
DATABASE_URL=<Mongodb URI>
DEPLOY=<Set this to TRUE for registering slash commands on startup>
NODE_ENV=<production|dev>
YOUTUBE_API_KEY=<Youtube api key>
YOUTUBE_COOKIE=<Youtube cookie keys>

If you are deploying in production, do set the NODE_ENV to production. On dev it logs errors to console and other helpful stuff which are usually not needed in production. Once you are done with the env file, install packages and seed the database. Seeding is required as some of the code expect the bare minimum data to be there in the database.

$ npm install
# then seed it
$ npm run prs:seed

You can modify the basic data to be seeded by editing the seed script. Finally edit the config file with your configuration. If you havent already, deploy the bot's slash commands for them to show up in your server.

$ npm run deploy

Or set the .env files DEPLOY variable to TRUE

Now run the bot.

$ npm run start

For any queries or problems, feel free to open an issue. I'll be happy to help.

Author

Saki ยฉ Yakiyo. Authored and maintained by Yakiyo & Look.

Released under MIT License.

saki's People

Contributors

muril-o avatar yakiyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

muril-o

saki's Issues

Better logging

Better error handling, log errors to a error.log file so they remain saved and can be viewed later on.
Replace error logging accross code to use the log function

say new line

  • Replace \n in input of slash command 'say' with new line character

Music

Create music related commands

Minor fixes

  • Handle music stop command when there is no current queue
  • music isn't playing when its running in the vps
  • message update should only run when diff in content, nothing else
  • avatar update not showing in prod

twitter system not working

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (C:\Users\dell\desktop\\node_modules\undici\lib\fe
tch\body.js:582:15)
    at successSteps (C:\Users\dell\desktop\\node_modules\undici\lib\fetch\bo
dy.js:522:23)
    at fullyReadBody (C:\Users\dell\desktop\\node_modules\undici\lib\fetch\u
til.js:863:5)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async specConsumeBody (C:\Users\dell\desktop\\node_modules\undici\lib
\fetch\body.js:537:3)
    at async Timeout.run [as _onTimeout] (C:\Users\dell\desktop\\dist\jobs\t
witter.js:12:

always gives me this error.. a little help?

spankies

Allow all mods to spank each other regardless of wether it works or not.

command perms

Disabled dms for commands, and maybe more robust command permissions

Modmail

Bi-directional modmail maybe?

welcome embed error

Raw query failed. Code: unknown. Message: Command failed (AtlasError): empty database name not allowed at c011d66f42ef93c352bdc551ec4a2f33/atlasproxy/session_proxy.go:704 at c011d66f42ef93c352bdc551ec4a2f33/atlasproxy/session_proxy.go:1763 at c011d66f42ef93c352bdc551ec4a2f33/atlasproxy/session_proxy.go:1181 at mongodb/[email protected]/proxy_session.go:371 at mongodb/[email protected]/proxy_session.go:131 at mongodb/[email protected]/session.go:177 at mongodb/[email protected]/server.go:280 at src/runtime/asm_arm64.s:1172)
at Pn.handleRequestError (C:\Users\dell\Desktop\saki\node_modules@prisma\client\runtime\library.js:171:6929)
at Pn.handleAndLogRequestError (C:\Users\dell\Desktop\saki\node_modules@prisma\client\runtime\library.js:171:6358)
at Pn.request (C:\Users\dell\Desktop\saki\node_modules@prisma\client\runtime\library.js:171:6237) {
code: 'P2010',
clientVersion: '4.14.0',
meta: {
code: 'unknown',
message: 'Command failed (AtlasError): empty database name not allowed\n' +
'\tat c011d66f42ef93c352bdc551ec4a2f33/atlasproxy/session_proxy.go:704\n' +
'\tat c011d66f42ef93c352bdc551ec4a2f33/atlasproxy/session_proxy.go:1763\n' +
'\tat c011d66f42ef93c352bdc551ec4a2f33/atlasproxy/session_proxy.go:1181\n' +
'\tat mongodb/[email protected]/proxy_session.go:371\n' +
'\tat mongodb/[email protected]/proxy_session.go:131\n' +
'\tat mongodb/[email protected]/session.go:177\n' +
'\tat mongodb/[email protected]/server.go:280\n' +
'\tat src/runtime/asm_arm64.s:1172)'
}
}

reaction role

Group of commands for adding, removing, editing reaction roles

use client emojis instead of guild emojis

reaction role add should be usable even with emojis from other guilds where the bot is present.
Possible solution:
Using <Client>.emojis.cache but it seems to return undefined when using with id.
Might need to cache all emojis or something.

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.