Code Monkey home page Code Monkey logo

raiha's Introduction

Raiha Accessibility Bot

Raiha is an alt text helper bot that enables adding alt text to new or existing messages.

  • To create a new message with Raiha, write a message as normal, then add the Raiha trigger command to the end of the message. For example, This is a picture of my cat! r! Tabby kitten sitting in a sink
  • To add alt text to an existing message, reply to the original message with a Raiha trigger command: r! Alt text for the image.
  • If there is more than one image in the message, split the alt text with |: r! Image 1 | Image 2 | Image 3.
  • Raiha supports the following triggers: r!, alt:, id:
  • Raiha supports Azure Computer Vision. Use r! $$ to generate an image description, and r! $$ocr to add OCR. These apply per-image, and can be mixed and matched: r! my cat | $$ | my dog | $$ocr

For moderation

Raiha will post a message to a channel of your choosing to alert moderators when a user's Loserboard score surpasses a multiple of your choice, as well as reminding them if a user is 5 strikes from the threshold.

Setup

  • Raiha requires a Firebase Real-Time Database for logging and leaderboards. The base tier is free, and it is highly unlikely Raiha will ever generate enough data to exceed the base tier.
  • Raiha also requires an Azure Cognitive Vision Service instance. The base tier is free, and allows for 20 requests per minute, 5000 per month.

Create a .env file in the project root and add the following to it:

  • TOKEN=[yourtoken]
  • DATABASE_URL=[databaseurl]
  • MOD_CHANNEL=[channelid]
  • CV_API_KEY=[yourkey]
  • CV_ENDPOINT=[endpoint, with trailing /]

Then, place your firebase.json in the /src/ folder.

Finally, in the firebase database, set the server configuration at /Configuration/[guildID]:

{
  ai: boolean,
  altrules: "default" | string,
  enableWarnings: boolean,
  errorChannel: string (channelID),
  errorMismatch: "default" | string (emojiID),
  errorNoAlt: "default" | string (emojiID),
  errorNotReply: "default" | string (emojiID),
  greenThreshold: number,
  leaderboard: boolean,
  loserboard: boolean,
  modChannel: string (channelID),
  modRole: string (roleName),
  muteThreshold: number (0 to disable),
  specialWarnThresholds: number[] (ignores enableWarnings value)
}

Some of these options are not yet implemented. Data types and names may change.

Development

Pull requests are always welcome.

License

Raiha is licensed under LGPL v3.0.

© 2022 9volt.

raiha's People

Contributors

9vult avatar natep-tech avatar 25pi25 avatar chris-bitler avatar

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.