Git Product home page Git Product logo

kuro's Introduction

Kuro Bot GitHub license Chat / Support

Kuro is an easy to use self bot that is shifting more and more into a framework while preserving its ease of use. It sits on top of discord.js. NodeJS version 6+ is REQUIRED. Installing Node.js

> Check this video to see how it works!

v4.1.0 Important Notes:

This only applies if you are upgrading from a previous version. In order to make the chat less jumpy and contribute with data caps and mobile users, sticker now behave differently than they did before. Stickers get uploaded to safe.moe now so they can be used inside an embed. By using embeds, kuro can now edit your message to display the sticker instead of deleting it and sending a new one. Even though that embeds are ugly this makes it so everyone can see your sticker faster by allowing caching of the URL on Discord's side.

So if you are upgrading to a new version, please run !s migrate to migrate your stickers to the new embed system.

Installing:

  1. Ensure you have node installed
  2. Run npm i -g kuro-cli
  3. Run kuro-cli
  4. Follow the instructions on screen

kuro-cli is a utility that will install and manage your Kuro installation. Whenever there's a new version available you can run kuro-cli and it will download, upgrade, update dependencies and restart automatically. Some options are not covered on the cli just yet, so you can go ahead and open config.json to look and modify them if you want.

If you don't want to use kuro-cli, simply clone the repo, npm install, rename the config.sample.json to config.json and modify it's values with your data.

Modules:

This new update brings every command in the form of separate modules. Inside each module you can make up the stuff you want, and you can execute it by calling the module name without the extension. There's a sample module ready for you to duplicate called base.js.

Example of a simple module with no dependencies that returns the server's member count on which you send the command:

exports.run = function(msg, args) {
  msg.delete()
  msg.channel.send('', {
    'embed': {
      'title': msg.guild.name,
      'description': `Member Count: ${msg.guild.memberCount}`,
      'color': 15473237
    }
  })
}

Pretty easy stuff. If you want me to include a module you've made, send a PR with your stuff and I'll look at it.

Bundled modules

Each module has detailed instructions inside their own files. Take a look at them for further details on how to use.

  • anime <name of the anime> Shows the first occurence of the searched anime on kitsu.io and returns a summary of it

  • emote [emote] Shows information about a custom emote.

  • eval [expression] A module to eval expressions. Dangerous stuff, don't use unless pretty sure of what you're doing.

  • eyes A module that edits a message to add the effect of animated eyes. You probably should update the emoji name if you're not on Pilar's server.

  • flip <this is amazing> sllɐqǝzɐɯɐ sı sıɥʇ

  • getcommand [module] Sends the specified module's source to the chat. Ex: !getcommand base would print base.js contents to chat.

  • gifspeed [url] Removes delay between frames of the given gif url and uploads it.

  • google <some stupid question> Creates a link to Google with your query when someone asks stupid questions

  • mal Prints information about your MyAnimeList username.

  • manga <name of the manga> Shows the first occurence of the searched manga on kitsu.io and returns a summary of it

  • members Shows the server's member count.

  • ping Simple tool to check delay between your bot and Discord.

  • playing [message] Change your playing status on Discord to the specified string. (Note you wont be able to see it due to a Discord limitation).

  • purge [number of messages] Grabs the supplied amount of messages from chat and deletes those that are yours.

  • reboot Reboots the Kuro. (Only works if using pm2|forever).

  • reload Reloads all the modules (Useful when developing).

  • react [message] React to the last message with regional characters. a-z 0-9, no spaces.

  • regional [message] Sends a message using regional character emojis.

  • s [name] | [add|del|ren] A module to manage stickers like Telegram does. Upload a sticker with a given name, and then make kuro paste it when you trigger the command.

  • smug Displays smug looking anime girls with patronizing looks on their faces.

  • stats Displays an embed with statistics.

  • status [online|idle|dnd|offline] The status you want to appear as whenever you're offline, since using Kuro will make discord think you're always online.

  • tag [name] | [add|del|ren] Saves the given text into a tag for later usage. For example tag add kuro https://github.com/kanadeko/Kuro would print https://github.com/kanadeko/Kuro every time I do tag kuro

  • tl Tries to translate the last message to english.

  • uptime Displays how long the bot has been running.

  • user <@user> Displays information about the tagged user

kuro's People

Contributors

112rg avatar joshwason1 avatar kosterlitz avatar pbanj avatar pitu avatar pitu-deploy 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kuro's Issues

Consider replacing kitsu.js with kitsu

kitsu.js is deprecated in favour of the more feature complete kitsu package that is fully JSON-API compliant.

Based on your current usage, search implementation would be something like:

const Kitsu = require('kitsu')
const kitsu = new Kitsu()

kitsu.fetch('anime', {
  filter: {
    text: search
  }
}).then({ data } => {
  if (data.length === 0) {
    return msg.edit(`No results found for: **${search}**`)
  }
  return prepareEmbed(msg, data[0])
})

text file support

would it be possible to add text file support. so it could post the content of a text file when you do a command.

Status

When the bot reboots and the user is online it sets the status to their offline status.

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.