All Projects β†’ Xetera β†’ HifumiOld

Xetera / HifumiOld

Licence: MIT license
πŸ› οΈ A Discord bot that focuses on managing large servers

Programming Languages

typescript
32286 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to HifumiOld

Loritta
πŸ’ A multipurpose, multilanguage, customizable, modular, and very cute bot for Discord using JDA! ~Making your server more awesome~
Stars: ✭ 253 (+837.04%)
Mutual labels:  moderation, discord-bot
Automod Bot
Fun moderation economy bot discord.js
Stars: ✭ 41 (+51.85%)
Mutual labels:  moderation, discord-bot
Fs0c13ty Bot
πŸ€– A discord bot made to help you in moderation.
Stars: ✭ 24 (-11.11%)
Mutual labels:  moderation, discord-bot
AntiScam-Bot
Discord bot written on discord.js, deletes messages with scam links.
Stars: ✭ 16 (-40.74%)
Mutual labels:  moderation, discord-bot
Calypsobot
A fully customizable bot built with discord.js
Stars: ✭ 131 (+385.19%)
Mutual labels:  moderation, discord-bot
discord-audit-log-bot
A Discord bot that extends Discord's native Audit Log.
Stars: ✭ 109 (+303.7%)
Mutual labels:  moderation, discord-bot
Remixbot
A multifunctional Discord bot in development that allows you to easily control your discord server.
Stars: ✭ 39 (+44.44%)
Mutual labels:  moderation, discord-bot
Discord Bot
πŸ€– Our BIG help in things about moderation and many more useful stuff on our Discord server.
Stars: ✭ 30 (+11.11%)
Mutual labels:  moderation, discord-bot
Discord Bot
A discord bot that can play music, moderate, log events and more
Stars: ✭ 127 (+370.37%)
Mutual labels:  moderation, discord-bot
Yuudachi
Discord moderation bot
Stars: ✭ 123 (+355.56%)
Mutual labels:  moderation, discord-bot
Welcome-Bot
A cool multi-purpose discord bot that solves all your problems. I have features such as Moderation, ModLog, Welcome & Goodbye logs, Fun, Music
Stars: ✭ 73 (+170.37%)
Mutual labels:  moderation, discord-bot
discord-js-bot
A cool multipurpose discord bot built using discord.js v13 with moderation, music, ticketing, translation, and much more
Stars: ✭ 135 (+400%)
Mutual labels:  moderation, discord-bot
Hourai
The world's most advanced security and moderation bot for Discord.
Stars: ✭ 37 (+37.04%)
Mutual labels:  moderation, discord-bot
warnable
Simple Discord bot to moderate Discord servers, specifically to warn members.
Stars: ✭ 34 (+25.93%)
Mutual labels:  moderation, discord-bot
Cleve
Open sourced Discord chat bot powered by brainshop.ai
Stars: ✭ 30 (+11.11%)
Mutual labels:  discord-bot, cleverbot
Yukiko
powerful Discord bot that includes XP system, Leaderboard, Music, Welcome and farewell message, Moderation, and much more!
Stars: ✭ 72 (+166.67%)
Mutual labels:  moderation, discord-bot
Selfbot.py
selfbot.py - A python discord selfbot thats easy to install - Written using discord.py
Stars: ✭ 191 (+607.41%)
Mutual labels:  moderation, discord-bot
hellsnakebot
πŸ€–About A fully customizable bot built with discord.js
Stars: ✭ 14 (-48.15%)
Mutual labels:  moderation, discord-bot
modmail.js
A Simple Discord Modmail Bot Template
Stars: ✭ 33 (+22.22%)
Mutual labels:  discord-bot
ValorantStoreChecker-discord-bot
Valorant Utility Bot
Stars: ✭ 154 (+470.37%)
Mutual labels:  discord-bot

This repository is archived and the bot is no longer operational, the new Hifumi bot can be found in https://github.com/moedevs/hifumi

Prefix: $ Language: Typescript Library: Discord.js Hifumi's Website Invite Me! Join the Support Server

To Features

To Program Structure and Architecture

To Setup

Features

  • Moderation: 🚫 Get all your moderators on the same page

    • Anti-Spam Hifumi automatically removes messages and mutes people when she detects spamming.
    • Invite Filtering Invites are automatically removed and added to a user's history, offenders are banned after 5 invites by default or a custom value if needed.
    • New Member Tracking To combat raiders, she has an option to track people who have joined in the past 5 minutes more closely. Banning on 2 invites instead of the custom limit (if invites are not allowed) and banning on detecting first spam instead of muting.
    • $history- Pull up a user's history with information on their previous strikes, notes, invites, mutes and join dates.
    • $strike - Warn members when they break rules anonymously, adding to their total strikes (or not with $warn), strikes are automatically expire after 2 weeks, users who go past the strike limit of the server are banned automatically
    • $note - Note something about a specific user for a later time, saving it in the members history
    • $mute - Mute a user for a specific time with a given reason
    • $cleanse - Remove messages sent by bots in a channel
    • $nuke - Clean all previous messages in a channel of a given amount
    • $snipe - Remove messages in a channel from a specific user
    • $ignore - Stop listening for commands and conversations from a specific user or channel
  • Management: πŸ› οΈ Tools to make server management easier

    • $suggest- Suggest something that you would like to see get added in the server
    • $suggestions - Look through suggestions that are waiting approval, approve the serious ones, deny the jokes by clicking on reactions
    • $accept - Accept someone's suggestion with a reason. Accepting suggestions DMs the user to let them know they contributed
    • $reject - Reject someone's suggestion with a reason. Rejecting suggestions also DMs the user to let them know they contributed
    • $addmacro - Add a new custom command for Hifumi to reply to with a response of your choosing
    • $macros - List all the macros in the server
    • $deletemacro - Deletes one of the previous saved macros
  • Customization: βš™ Change Hifumi to fit your server

    • $setgreeting - Customize the message you want Hifumi to greet new members with
    • $log - Change logging settings by assigning a channel for a specific category of logs or turning it off entirely
      • Logging options: joins, leaves, mutes, bans, unbans, channel management, suggestions, commands, invites, ping spam
    • $settings - Changes bot settings
      • $settings prefix - Changes the prefix I reply to
      • $settings hints - Hifumi tries to guess what you meant when you enter incorrect commands
      • $settings reactions - Reactions are added to certain messages, or not, if you find that annoying
      • $settings tracking - Enable/disable tracking of new members
      • $settings invites - Are invites ok to send in this server?
      • $settings invitewarn - Threshold for warning members for sending invites
      • $settings inviteban - Threshold for banning members for sending invites
      • $settings strikelimit - Max number of strikes a user can have before getting banned (3 by default)
  • Fun: πŸŽ‰ Time to relax

    • $anime - Sends details about a specific anime and the date the next ep comes out on (if still airing)
    • $character - Sends information about an anime character
    • $whatanime - Tries to find the name and the episode of an anime from a screenshot or a gif
    • $doggo - Sends a cute 🐢 and its breed
    • $randomquote - A quote... that is random
    • $ch - Random cyanide and happiness comic

Program Structure and Architecture

Commands

Declaration

Commands are all declared under src/commands/**/*.ts and are globbed in src/handlers/commands/CommandHandler.ts.

The addition of a new command only requires that a variable called command is exported somewhere inside src/commands

Parsing

Before commands are called, information is parsed in src/parsers/argParse.ts.

All command requirements like arguments and user/client permissions are declared in the Command object that is exported and parsed before calling the command.

A command is only called if these requirements are met.

All necessary arguments are passed into the run function's second parameter as a tuple.

More info...

API

Anime

Anime information is all taken from AniList using graphql.

"Wait a minute, anilist? How are you getting such accurate anime search results?!"

Heh, as much as I love anilist and their API, unfortunately their search engine soon to be changedβ„’ is really bad. To get around this we use MAL instead... except not really. MAL's API is still either down or not working properly, also their API is
from the stone ages so instead we only use the search hinting endpoint.

This search function for MAL seems to be operating independently from the rest of their API, you don't need any sort of authorization to make a request to the endpoint AND there's virtually no rate limiting. Plus, due to the nature of the search function, the responses are usually blazing fast.

https://myanimelist.net/search/prefix.json?type=[all|manga|anime]&keyword=[url encoded query here]

The information that's returned is mostly irrelevant except for the order of the items array which represents the closest match and the id property. Because AniList is so awesome, almost all of their entries also contain the MAL id of anime entries, meaning that all that's left to do is query AniList using the mal_id and that's it!

The only caveat is that sometimesMAL will return results based on popularity and not search match so it's necessary to go through all the results and look for a perfect case-insensitive match before we pull the first result in case a user searches for Sword Art Online or New Game!!.

Database

TypeORM is used for all database transactions.

A Redis cache layer is used to speed up common actions like fetching guild prefixes.

Database information is stored in src/database including

  • Models
  • Functions
  • Migrations

For now, migrations are created manually for production are handled by TypeORM's CLI.

Backups

For database backups, python scripts are used to dump the current production db into Amazon S3 bucket.

This script is set on a cron job of regular intervals, and an X amount of backups are rotated inside the bucket, deleting the oldest version on every backup once X is reached to preserve limited bucket space.

A backup-restoration script is available to restore the latest backup if necessary.

## Setting Up Hifumi
Coming soon...

#### Inspired by [HotBot](https://gitlab.com/Aberrantfox/hotbot) in [The Programmer's Hangout](https://discord.gg/programming)

#### This repo was not originally meant to be self-hosted or contributed to, so there's quite a significant chunk of code that's either hardcoded or made to be very convenient for Hifumi in specific. Although it will be made easier in the future, you're probably going to have a hard time trying to fork or self-host this repo as of now.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].