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
Fully asynchronous trace.moe API wrapper

AioMoe Fully asynchronous trace.moe API wrapper Installation You can install the stable version from PyPI: $ pip install aiomoe Or get it from github

2 Jun 26, 2022
A customizable, multilanguage Telegram shop bot with Telegram Payments support

Greed A customizable, multilanguage Telegram shop bot with Telegram Payments support! Demo Send a message to @greedtestbot on Telegram to view a demo

Stefano Pigozzi 328 Dec 29, 2022
Gathers data and displays metrics related to climate change and resource depletion on a PowerBI report.

Apocalypse Status Dashboard Purpose Climate change and resource depletion are grave long-term dangers. The code in this repository will pull data from

Summer Is Here 1 Nov 12, 2021
Set up recurring buys in Gemini

Overview Set up recurring buys in Gemini. Given some keys (Create API Keys), allows you to configure a recurring buy using the reduced API maker and t

Ahmad Abuomar 3 Jan 06, 2022
An asyncio Python wrapper around the Discord API, forked off of Rapptz's Discord.py.

Novus A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. A full fork of Rapptz's Discord.py library, with

Voxel Fox 60 Jan 03, 2023
Telegram bot to host python bots

Host-Bot Setup the api Upload the flask api on your host #its not important to do #i used it just for simple captcha system + save ids on your host!

Plugin 15 Feb 11, 2022
Lumi-Bot - Discord bot that fetches cryptocurrency prices utilizing CoinGeko API

Lumi-Bot Discord bot that fetches and monitors cryptocurrency prices utilizing C

Diego Castro 2 Oct 08, 2022
修改自SharpNoPSExec的基于python的横移工具 A Lateral Movement Tool Learned From SharpNoPSExec -- Twitter: @juliourena

PyNoPSExec A Lateral Movement Tool Learned From SharpNoPSExec -- Twitter: @juliourena 根据@juliourena大神的SharpNOPsExec项目改写的横向移动工具 Platform(平台): Windows 1

<a href=[email protected]"> 23 Nov 09, 2022
A multipurpose, semi-modular Discord bot written in Python with the new discord.py module.

Discord.py Reaction Bot MIRAI KURIYAMA A multipurpose, semi-modular Discord bot written in Python with the new discord.py module. Installing dependenc

1 Dec 02, 2021
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Feb 03, 2022
Ciclo 1 - MisiónTIC - UIS (Retos)

misiontic_uis Ciclo 1 - MisiónTIC - UIS Reto 1: Fundamentos del Lenguaje Python Reto 2: Estructuras de Control Condicional Reto 3: Estructuras de Cont

9 May 24, 2022
A simple program to display current playing from Spotify app on your desktop

WallSpot A simple program to display current playing from Spotify app on your desktop How to Use: Linux: Currently Supports GNOME and KDE. If you want

Nannan 4 Feb 19, 2022
Brute force instagram account / actonetor, 2021

Brute force instagram account / actonetor, 2021

actonetor 6 Nov 16, 2022
Python package for Calendly API v2

PyCalendly Python package to use Calendly API-v2. Installation Install with pip $ pip install PyCalendly Usage Getting Started See Getting Started wi

Lakshmanan Meiyappan 20 Dec 05, 2022
NFT Generator - A NFT Generator created using Python

NFT_Generator v1 An NFT Generator created using Python. This NFT Generation tool

3 Dec 02, 2022
This is a straightforward python implementation to specifically grab basic infos about IPO companies in China from Sina Stock website.

SinaStockBasicInfoCollect This is a straightforward python implementation to specifically grab basic infos about IPO companies in China from Sina Stoc

CrosSea 1 Dec 09, 2021
AWS Lambda Fast API starter application

AWS Lambda Fast API Fast API starter application compatible with API Gateway and Lambda Function. How to deploy it? Terraform AWS Lambda API is a reus

OBytes 6 Apr 20, 2022
This an API wrapper library for the OpenSea API written in Python 3.

OpenSea NFT API Python 3 wrapper This an API wrapper library for the OpenSea API written in Python 3. The library provides a simplified interface to f

Attila Tóth 159 Dec 26, 2022
The programm for collecting data from Tinkoff API and building Excel table.

tinkproject The program for portfolio analysis via Tinkoff API Hello! This is my first project, please, don't judge me. This project was developed for

214 Dec 02, 2022
Make your Pass (sanitaire) Fun Again

Make Your Pass (Sanitaire) Fun Again Customize your Pass Sanitaire (French name for EU digital Covide19 Certificate) with colors and images, thus make

101 Dec 01, 2022