Discord bot that performs various functions.

Overview

rikka-bot Support me on Patreon!

A Discord bot that performs various functions.

Python 3.6 Discord Bots Discord Bots

Table of Contents

  1. Commands
  2. In The Works
  3. Special Thanks

Commands

Right now, this bot's prefix is ;.

Main Commands

Utility Commands

  • @mention help - Returns a command list, along with your server's prefix.
  • ;help - Returns a command list.
  • ;info - Returns information about the bot.
  • ;paypal - Returns donation link to contribute to server hosting.
  • ;vote - Returns this server's vote link on discordbots.org.
  • ;clever (text) - Returns the cleverbot response to the given text.
  • ;gizoogle (text) - Translates a given text with gizoogle.
  • ;translate (text) - Translates the specified text to English.
  • ;suggest (suggestion) - Adds a completely anonymous suggestion to better the bot.
  • ;quickvote (vote) - Creates a message with thumbs up and thumbs down, in a pretty text embed.
  • ;sayd (message) - Allows you to say an anonymous message by saying what you tell it to, and then deleting your message. Prevents @everyone, of course.
  • ;wolfram (query) - Queries a response to Wolfram Alpha.

Admin Commands

  • ;prefix (prefix) - Changes the prefix to a set custom prefix. (Must be admin)
  • ;clear (number) - Clears a set number of messages from the given channel. (Must have manage message permission)
  • ;clear (user) - Clears any messages authored by the specified user in the channel. (Must have manage message permission)
  • ;mute / ;unmute (user) - Mutes/unmutes specified user. (Must have manage message permission)
  • ;kick (user) - Kicks the specified user. (Must have kick permission)
  • ;ban (user) - Bans the specified user. (Must have ban permission)
  • ;add (points) (user(s)) - Adds a set number of points to mentioned user(s). (Must be admin)
  • ;subtract (points) (user(s)) - Subtracts a set number of points from mentioned user(s). (Must be admin)

Self-Assignable Roles

NOTE: In order to do this, Rikka must be placed above the users you would like to enable assigning to. Failure to do so will fail to assign the roles.

Rikka has a self-assignable roles system. If it is enabled for your server, you can create roles to assign yourself and other users. For these commands to work, the role names must match perfectly.

Enabling/Disabling/Listing

  • ;iamlist - Lists the assignable roles.
  • ;assign enable (role name) - Enables assignability for the given role. (Must have Manage Roles permission)
  • ;assign disable (role name)- Disables assignability for the given role. (Must have Manage Roles permission)

Assigning/Unassigning Roles

  • ;iam (role name) - Assigns yourself the role.
  • ;iamnot (role name) - Unassigns yourself the role.

Color Role System

NOTE: In order to do this, Rikka must be placed above the roles whose colors you would like to override. Failure to do so will just create and assign the role without any effect.

Rikka has a color role system. If it is enabled for your server, you can set your own color from the image below.

Color Chart

Setup

Setup requires manage roles permission.

  • ;colors (enable/disable) - enables or disables the color role mode for your server.

Usage

  • ;color (color) - Sets your color to the specified color.
  • ;color reset - Removes all of your color roles, resetting you to your original color.

Economy System

Rikka's economy system consists of a global leaderboard. Currently, you can get points in two ways: Getting questions right with the ;trivia command, and collecting points daily.

  • ;score - Displays your score, or another user's score, globally.
  • ;collect daily - Gets your daily collections.
  • ;leaderboard global - View the global leaderboard across all of rikka's servers.
  • ;leaderboard local - View the local leaderboard across all of the users on the current server.
  • ;give (points) (user) - donate points to another user.

Fun Commands

  • ;insult (user) - Sends a random insult to the given user.
  • ;ramsay - Returns a random Gordon Ramsay quote.
  • ;gay - no u
  • ;rate (thing to rate) - Rates whatever you tell it to rate on a scale of 1-10.
  • ;ping - For that annoying person who keeps @everyoneing.
  • ;beemovie - Returns a random bee movie quote.

MAL Commands

  • ;mal (anime) - Returns the result of the anime search.
  • ;mal m/(manga) - Returns the result of the manga search.
  • ;malqa (anime) - Returns the result of the anime search.
  • ;malqm (manga) - Returns the result of the manga search.
  • ;mal id a/(anime id) - Returns the result of the anime ID search.
  • ;mal id m/(manga id) - Returns the result of the manga ID search.

XKCD Commands

  • ;xkcd - Returns a random XKCD comic.
  • ;xkcd (number) - Returns a specific XKCD comic.
  • ;xkcd latest - Returns the latest XKCD comic.

Gif Commands

  • ;hello - Says hi.
  • ;hugme - Hugs you.
  • ;hug @user - Hugs the specified user.

Emotes

Note: All emotes are entirely SFW.

  • shocked, smile, hentai, blush, bdsm, rekt, boop, fuckoff, sanic, dreamy, kys

Gelbooru Commands

These commands require the channel to be marked as NSFW.

  • ;gelbooru random - Fetches a random gelbooru post.
  • ;gelbooru latest - Fetches the latest gelbooru post.
  • ;gelbooru tags (tags, comma separated) - Fetches a post that matches the specified tags.

Game Commands

Trivia Commands

  • ;trivia - Returns the help menu for trivia.
  • ;ask - Returns a randomly selected question.
  • ;a (attempt) - Tests the given attempt to see if it is correct. If it is correct, you are granted a point.
  • ;reveal - Reveals the answer, removing the ability to score for that specific question.

Casino Commands

  • ;roll - Rolls a die.
  • ;flip - Flips a coin.
  • ;8ball (question) - Tells you the future.
  • ;raffle - Select a random (non-bot) user from your server

Board Functionality

This feature is currently not functional. Sorry!

The board functionality allows popular messages to be posted on a special channel, titled board. To use this functionality, you must first run ;board enable. Afterwards, every message with 3 reactions with the "" will get posted to the board.

In the works

  • Improved, proprietary AI, instead of cleverbot.
  • Aliases for Self-Assignable Roles
  • Minecraft Server Status

Special Thanks

Comments
  • Give Points Command

    Give Points Command

    Implement a ;give points <user> <amount> command with the following spec:

    • If a user's balance >= amount, give amount points to user.
    • If a user's balance < amount, throw an error.
    • Function must use Economy.addPoints and not implement another function.
    enhancement good first issue 
    opened by LeoSaucedo 2
  • XKCD Cog Breaks Program

    XKCD Cog Breaks Program

    When Cogs.Xkcd is included in the cogs for Rikka, this error is thrown:

    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: Traceback (most recent call last):
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/.env/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 607, in _load_from_module_spec
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:     spec.loader.exec_module(lib)
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/Cogs/Xkcd.py", line 10, in <module>
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:     class Xkcd(commands.Cog):
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/Cogs/Xkcd.py", line 11, in Xkcd
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:     required_response_fields: list[str] = ['year', 'month', 'day', 'alt', 'num']
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: TypeError: 'type' object is not subscriptable
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: The above exception was the direct cause of the following exception:
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: Traceback (most recent call last):
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/robot.py", line 111, in <module>
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:     bot.load_extension(cog)
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/.env/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 664, in load_extension
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:     self._load_from_module_spec(spec, name)
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/.env/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 610, in _load_from_module_spec
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:     raise errors.ExtensionFailed(key, e) from e
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: discord.ext.commands.errors.ExtensionFailed: Extension 'Cogs.Xkcd' raised an error: TypeError: 'type' object is not subscriptable
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: Exception ignored in: <function ClientSession.__del__ at 0x7fed9fa20af0>Jul 18 22:12:37 ip-172-31-80-202 python[45745]: Traceback (most recent call last):
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/opt/rikka/rikka-bot/.env/lib/python3.8/site-packages/aiohttp/client.py", line 314, in __del__
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/asyncio/base_events.py", line 1740, in call_exception_handler
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 1475, in error
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 1186, in emit
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]:   File "/usr/lib/python3.8/logging/__init__.py", line 1176, in _open
    Jul 18 22:12:37 ip-172-31-80-202 python[45745]: NameError: name 'open' is not defined
    Jul 18 22:12:37 ip-172-31-80-202 systemd[1]: rikka.service: Main process exited, code=exited, status=1/FAILURE
    Jul 18 22:12:37 ip-172-31-80-202 systemd[1]: rikka.service: Failed with result 'exit-code'.
    

    Environment Details:

    Python 3.8.10 (default, Jun  2 2021, 10:49:15)
    [GCC 9.4.0] on linux
    

    We should make sure our changes are consistent with the current python version being used by the bot.

    bug 
    opened by LeoSaucedo 1
  • View Other User's Inventory

    View Other User's Inventory

    Implement ;inv <user> with the following spec:

    • If the parameter mentioned is a valid user, display their inventory.
    • If the parameter is not a valid user, throw an error.
    • Must use existing getInventory functions.
    enhancement 
    opened by LeoSaucedo 1
  • XKCD Command

    XKCD Command

    Implement the XKCD command with the following spec:

    • Command must respond to ;xkcd.
    • If ;xkcd or ;xkcd random is given, return a random XKCD comic.
    • If ;xkcd 123 is given, return a XKCD comic 123, etc.
    • If ;kxcd latest is given, return the lastest XKCD comic.
    • Include image, title, and description in the embed.
    • All calls must be made with aiohttp.
    enhancement good first issue 
    opened by LeoSaucedo 1
  • Answer command sometimes is not interpreted

    Answer command sometimes is not interpreted

    Screenshot_20210717-163108

    The answer command is sometimes not triggered when a user attempts to answer an active trivia question. Normal behavior always prompts a response from the bot, whether it is correct or not, and in the attached example no message was returned.

    We must investigate why the answer isn't returning and what we can do to resolve it.

    bug 
    opened by LeoSaucedo 1
  • ;leaderboard global breaks on non-existent user

    ;leaderboard global breaks on non-existent user

    image Rikka returns this error whenever the user inside of the leaderboard is not valid.

    A try-catch is the easy fix, but there could be another, better fix that removes the null user from the leaderboard, which should be integrated once the sql branch is released.

    bug 
    opened by LeoSaucedo 1
  • Trivia answer attempt is triggered whenever a message starts with ;a.

    Trivia answer attempt is triggered whenever a message starts with ;a.

    In this example, two separate functions are called: image

    There needs to be a way to sort out attempts, perhaps by renaming the attempt call or rewriting the code with the if statements.

    bug 
    opened by LeoSaucedo 1
  • Some insults are grammatically incorrect

    Some insults are grammatically incorrect

    When selecting a random insult with the SFW insult command, the program does not make any effort to be grammatically correct, and uses the "a" article instead of selecting "a" or "an" depending on the word the article is referencing. image

    bug 
    opened by LeoSaucedo 1
  • UnboundLocalError when CleverBot fails

    UnboundLocalError when CleverBot fails

    When CleverBot fails, when returning the "failed" message, it results in an UnboundLocal error. This is because it is sending a new message when it fails, instead of defining "msg" upon its success.

    bug 
    opened by LeoSaucedo 1
  • Change from Deprecated Library and Handle Discord Intents Update

    Change from Deprecated Library and Handle Discord Intents Update

    DBL was obviously deprecated, causing rikka-bot to no longer function. The Discord update messed with a few other things as well with the introduction of Intents. Toppggpy appears to be DBL's successor and seems to run when the proper changes are made.

    I would like some review on this, perhaps maybe a bit more refined pickings of the Intents, but this allows for the bot code to compile and run.

    image

    image

    opened by SirTarragon 1
  • Add opt-out of bot function

    Add opt-out of bot function

    To make a message contents privileged intent to Rikka, we must implement a way for a user to opt out of having their message information read. This should be done via DMing the bot, and we should keep a database of User IDs that have opted out of using Rikka within a server. This requires us having a new database column or table containing this information as well as a function implementation for receiving DMs. This action should be reversible and should be able to be reversed via DMs as well.

    enhancement 
    opened by LeoSaucedo 0
  • Add privacy policy command

    Add privacy policy command

    To request the message content privileged gateway, we need to implement a command that spits out a generic privacy policy.

    This requires:

    • Upload a generic privacy policy to the repository
    • Link to it within Rikka via a command
    enhancement 
    opened by LeoSaucedo 0
  • Eval Command

    Eval Command

    Implement an admin-only ;eval args Command with the following spec:

    • When a user supplies a valid argument, we shall execute the python command that is given and return it in a formatted string.
    • Errors in executing the command should not fail the bot running.
    • This command must be non-ocking.

    Admin-only is to be defined as users contained within a config.json object of trusted people.

    enhancement 
    opened by LeoSaucedo 0
  • Compare only alphanumeric characters for Trivia

    Compare only alphanumeric characters for Trivia

    The format command must be updated so that it only preserves alphanumeric characters and removes "a", "an" and "the" from the beginning of the answers and attempts. This is to resolve most issues with the comparison.

    bug 
    opened by LeoSaucedo 0
  • Give Items Command

    Give Items Command

    Implement a ;give item <user> <item> <amount> feature with the following spec:

    • If a user owns >= amount items, give amount items to user.
    • If a user owns < amount items, inform the user that there is not enough of the item to give.
    • Use the addItem on both the donor and receiver to prevent item inflation.
    enhancement 
    opened by LeoSaucedo 0
Releases(0.0.1)
Owner
Carlos Saucedo
Computer Science at Florida State University. Software Engineering at Grainhouse.
Carlos Saucedo
A Telegram bot to download posts, videos, reels, IGTV and a user profile picture from Instagram!

Telegram Bot A telegram bot to download media from Instagram! No API Key or Login Needed! Requirements You must have python installed (of course) You

Simon Farah 2 Apr 10, 2022
칼만 필터는 어렵지 않아(저자 김성필) 파이썬 코드(Unofficial)

KalmanFilter_Python 칼만 필터는 어렵지 않아(저자 김성필) 책을 공부하면서, Matlab 코드를 Python으로 변환한 것입니다. Contents Part01. Recursive Filter Chapter01. Average Filter Chapter0

Donghun Park 20 Oct 28, 2022
MAASTA is a wrapper to create an Ansible inventory for MAAS instances that are provisioned by Terraform.

MAASTA is a wrapper to create an Ansible inventory for MAAS instances that are provisioned by Terraform.

Saeid Bostandoust 144 Dec 16, 2022
SpamBot.py allows you, to spam other Chat Partners etc.

SpamBot -SpamBot.py allows you, to spam other Chat Partners etc. Install If you downloaded it yet, you have to install "requirements.txt" write the di

Marco 1 Jan 16, 2022
Dicha herramienta esta creada con una api... esta api permite enviar un SMS cada 12 horas dependiendo del pais... Hay algunos paises y operadoras no están soportados.

SMSFree pkg install python3 pip install requests git clone https://github.com/Hidden-parker/SMSFree cd SMSFree python sms.py DISFRUTA... Dicha herrami

piter 2 Nov 14, 2021
Gorrabot is a bot made to automate checks and processes in the development process.

Gorrabot is a Gitlab bot made to automate checks and processes in the Faraday development. Features Check that the CHANGELOG is modified By default, m

Faraday 7 Dec 14, 2022
Hacktoberfest2021 - Submit Just 4 PRs to earn SWAGS and Tshirts🔥

dont contribute in this repo, contribute only in below mentioned repo Special Note For Everyone ''' always make more then 4 pull request lets you have

Keshav Singh 820 Jan 02, 2023
You have 3 files: create mass groups, add mass members, rename all groups (only educational use!)

EDUCATIONAL ONLY! HOW TO INSTALL Edit config.json with your discord account token and the imagepath (if its in the same location as the all_together.p

46 Dec 27, 2022
A Python client for the Softcite software mention recognizer server

Softcite software mention recognizer client Python client for using the Softcite software mention recognition service. It can be applied to individual

4 Feb 02, 2022
A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place

A simple Discord Bot A simple discord bot written in python which can surf subreddits, send a random meme, jokes and also weather of a given place. We

1 Jan 24, 2022
POC de uma AWS lambda que executa a consulta de preços de criptomoedas, e é implantada na AWS usando Github actions.

Cryptocurrency Prices Overview Instalação Repositório Configuração CI/CD Roadmap Testes Overview A ideia deste projeto é aplicar o conteúdo estudado s

Gustavo Santos 3 Aug 31, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
A BOT TO FIND ID OF A STICKER.

sticker id A BOT TO FIND ID OF A STICKER. THIS REPOSITORY HAVE TWO BRANCHES FOR DEPLOY WITH COMMAND & WITHOUT COMMAND. Mandatory variables API_ID - Ge

Ashik Muhammed 3 Dec 29, 2022
Pretend to be a discord bot

Pretendabot © Pretend to be a discord bot! About Pretendabot© is an app that lets you become a discord bot!. It uses discord intrigrations(webhooks) a

Advik 3 Apr 24, 2022
Sentiment Analysis web app using Streamlit - American Airlines Tweets

Analyse des sentiments à partir des Tweets L'application est développée par Streamlit L'analyse sentimentale est effectuée sur l'ensemble de données d

Abida Hassan 2 Feb 04, 2022
fhempy is a FHEM binding to write modules in Python language

fhempy (BETA) fhempy allows the usage of Python 3 (NOT 2!) language to write FHEM modules. Python 3.7 or higher is required, therefore I recommend usi

Dominik 27 Dec 14, 2022
This repository is used to simplify the process of cloning the SSM documents across the AWS regions.

SSM Cloner Introduction This module is created in order to simplify the process of copying the SSM documents from one region to another regions. As an

6 Jun 04, 2022
Reverse engineered connection to the TradingView ticker in Python

Tradingview-ticker Reverse engineered connection to the TradingView ticker in Python. Makes a websocket connection to the Tradeview website and receiv

Aaron 20 Dec 02, 2022
Automatically check for free Anmeldung appointments.

Berlin Anmeldung Appointments (Python) This Python script will automatically check for free Anmeldung appointments in Berlin, and find them for you. T

Martín Aberastegue 6 May 19, 2022
Nyon-stream - A python script that uses webtorrent to stream nyaa videos directly to mpv

nyon-stream A rather shitty script that uses webtorrent to stream nyaa videos di

18 Feb 08, 2022