Giter Site home page Giter Site logo

navi's Introduction

Navi

License: MIT Python: 3.12 Database: SQLite

Reminder / Helper for EPIC RPG.

How to invite Navi

If you don't want to run Navi yourself, you can invite Navi Lite. This is a global version hosted by me. To prevent rate limit issues, it has the following limitations:
• Reactions are permanently disabled.
• Auto-ready frequency is fixed to after hunt only.

How to run Navi

• Install python 3.12.
• Install all third party libraries mentioned in requirements.txt (python3.12 -m pip install -r requirements.txt).
• Create a Discord application with a bot user, activate the required intents (see below) and generate a bot token.
• Rename default.env to .env and set the variables mentioned in the file.
• Rename database/default_db.db to database/navi_db.db.
• Upload all emojis in images/emojis to private servers. DO NOT CHANGE THEIR NAMES.
• Run the bot by running bot.py (python3.12 bot.py).
• Invite Navi to all your emoji servers and all other servers you want to use it. Note the required permissions below.
• Run the command /dev emoji-update to update the emojis in the code to your uploaded ones.
• Run the command /dev emoji-check to make sure all emojis are present.

How to update Navi

• Replace all other .py files with the new ones.
• Upload new emojis (if any) in images/emojis to your emoji servers. DO NOT CHANGE THEIR NAMES.
• Run the command /dev emoji-update to update the emojis in the code to your uploaded ones.
• Run the command /dev emoji-check to make sure all emojis are present.
• Restart the bot.

Required intents

• guilds
• members
• message_content
• messages

Required permissions

• Send Messages
• Embed Links
• Add Reactions
• Use External Emoji
• Read Message History
• Attach files

Commands

Navi uses both slash and text commands. Use /help for an overview.
Default prefix for text commands is navi and is changeable in /settings server.

Dev commands

These commands provide bot admin level functionality and are restricted as follows:
• They can only be used by users set in DEV_IDS. • They are not registered globally and only show up in the servers set in DEV_GUILDS.
• They are not listed in /help.
Do not change this behaviour. Some of them would expose data, others would allow users to mess with your Navi.

The following commands are available:

/dev cache, navi dev cache

Shows the size of the local message cache. All user messages containing a mention of epic rpg or starting with "rpg " are cached for 1 minute to speed up command detection.

/dev consolidate, navi dev consolidate

Manually triggers the tracking consolidation. This runs daily at 00:00 UTC, so you probably won't need this.

/dev emoji-check, navi dev emoji-check

Checks if alle emojis Navi needs are uploaded and present.

/dev event-reductions, navi dev er

Manages global event reductions. If there is a global reduction (e.g. 25% on New Year event), you can set this here.
Always check what is actually affected before changing this, it's never all commands even when lume says otherwise. guild, daily and weekly are almost never included for example.

/dev leave-server, navi dev leave-server

Makes Navi leave the discord server with the provided ID. You can see server IDs in /dev server-list. You don't have to be in a server yourself for this to work.

/dev post-message, navi dev pm <message id> <channel id> <embed title>

Allows you to send a custom message via Navi to a channel. I use this to post Navi updates.

/dev reload, navi dev reload <modules>

Allows reloading of cogs and modules on the fly.
Note that you should always restart the bot when there is a breaking change, no matter what.

It's not possible to reload the following files:
• Cogs with slash command definitions. Due to Discord restrictions, you need to restart the whole thing if you change slash commands.
• The file bot.py as this is the main file that is running.
• The file tasks.py. I had mixed results with this, just restart instead.

To reload files in subfolders, use folder.file (e.g. resources.settings). Cogs don't need that, the filename is enough (e.g. adventure).

/dev server-list, navi dev server-list

Lists all servers Navi is in by name.

/dev shutdown, navi dev shutdown

Shuts down the bot. Note that if the bot is registered as a systemctl or systemd service, it will of course automatically restart.

/dev support, navi dev support

Shows a link to the dev support server (see below).

Ignore other dev commands, they are my own test commands and might even mess up something for you.

Support server

• If you find bugs, have issues running Navi or something else, feel free to join the support server.

navi's People

Contributors

mirielch avatar kuyumee avatar jbasalone avatar rouven0 avatar yabessy 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.