Skip to content

Niko is a easy to use ai chatbot for discord that includes many different features and commands as well as a modular cog system and regular updates.

Notifications You must be signed in to change notification settings

developer51709/Niko

Repository files navigation

Niko Discord Bot

Overview

A Discord bot powered by a local LLM (TinyLlama) that has a unique personality. The bot responds when mentioned by name or pinged, and remembers interactions with users.

Project Structure

  • bot.py - Main bot code with Discord integration and LLM handling
  • requirements.txt - Python dependencies
  • memory.json - User memory storage (created at runtime)
  • *.gguf - LLM model file (downloaded at first run)
  • \cogs - This folder is for command cogs and are loaded dynamically when the bot is started

Dependencies

  • discord.py - Discord API wrapper
  • ctransformers - Local LLM inference
  • requests - HTTP requests for model download
  • colorama - Adds colored terminal logs for more user friendly logging

Configuration

The bot requires a DISCORD_BOT_TOKEN secret to be set. This is your Discord bot token from the Discord Developer Portal.

Running

The bot runs as a console application. It will:

  1. Download the TinyLlama model on first run (~600MB)
  2. Load the model into memory
  3. Connect to Discord and respond to messages

Commands

  • !help - See the full command list
AI Commands
  • Mention "niko" in a message or ping the bot
  • !ai <message> - Direct message to the bot
  • !favor [@user] - Check favorability score
  • !memory [@user] - Get the bots conversation history for a specific user
Fun Commands
  • !uwulock - Locks a user so their messages become uwu‑ified
  • !meme - Fetch a random meme using meme-api.com.
  • !tictactoe <@user> - Play a game of tictactoe with another user.
Economy Commands
  • !balance [@user] - Check your balance or another user's balance.
  • !bank - View your bank balance.
  • !buy <item> - Buy an item from the shop.
  • !crime - Commit a crime to earn money.
  • !daily - Claim your daily reward.
  • !deposit <amount> - Deposit money into the bank.
  • !inventory - View your inventory.
  • !leaderboard - View the economy leaderboard.
  • !networth - View your net worth.
  • !pay <user_id> <amount> - Pay another user money.
  • !rob <user_id> - Rob another user to earn money.
  • !sell <item> - Sell an item from your inventory.
  • !shop - View the shop.
  • !withdraw <amount> - Withdraw money from the bank.
  • !work - Work to earn money.
Gambling Commands
  • !blackjack <amount> - Play a game of blackjack
  • !slots <amount> - Play a game of slots
  • !roulette - Play a game of roulette
Info Commands
  • !about - Get info about the bot
  • !avatar [@user] - View a users pfp
  • !booststats - View boost info for the server
  • !creator - Learn about the bot creator
  • !debuginfo - View debug info for the bot
  • !hostinfo - View info about the bots host
  • !roleinfo [@role] - View info about a role on the server
  • !serverbanner - View the server banner
  • !servericon - View the server icon
  • !serverinfo - View info about the server
  • !serverstats - View the server stats
  • !spotify [@user] - See what a user is listening to on spotify
  • !userinfo [@user] - View info about a user
Roleplay Commands
  • !fuck <user_id> - Fuck another user. (not really)
  • !hug <user_id> - Hug another user. (not really)
  • !kill <user_id> - Kill another user. (not really)
  • !makeout <user_id> - Make out with another user. (not really)
  • !rape <user_id> - Rape another user. (not really)
Utility Commands
  • !boring - A boring command
  • !crazy - Crazy? I was crazy once...
  • !echo - echo a message
  • !nitro - free nitro?
  • !notboring - a not boring command :P
  • !partnership_request - a command for submitting a server partnership request
  • !ping - Pong!
  • !uwu - UwU
Moderation Commands
  • !kick - Kick a member from the server.
  • !ban - Ban a member from the server.
  • !unban - Unban a user by ID.
  • !warn - Warn a member.
  • !warnings - View a member's warnings.
  • !clearwarnings - Clear all warnings for a member.
  • !mute - Mute a member.
  • !tempmute - Temporarily mute a member. Duration in seconds.
  • !unmute - Unmute a member.
  • !clear - Clear a number of messages.
  • !purge - Purge messages from a specific user.
  • !slowmode - Set slowmode in this channel (seconds).
  • !lock - Lock this channel.
  • !unlock - Unlock this channel.
  • !nick - Change a member's nickname.
  • !setmodlog - Set the mod-log channel.
  • !badwords - Show the blocked word list.
AutoMod Commands
  • !automod [toggle|threshold|mentions] - Manage the automod config for the current server
EmojiManager Commands
  • !emojimanager - Displays the help menu for the Emoji Manager cog.
  • !steal - Steals a single custom emoji from any server and adds it to the current one.
  • !steal-multiple - Steals multiple custom emojis in one command.
  • !steal-from-url - Adds a new emoji by providing a direct image URL.
  • !stickersteal - Steals a sticker by prompting the user to send one in the chat.
  • !enlarge - Displays a larger PNG/GIF version of a given custom emoji.
  • !emojistats - Displays a detailed breakdown of the server's emoji usage and available slots.
  • !list-emojis - Provides a list of all custom emojis in the server with their names and animated status.
  • !extract-emoji - Sends the image file for a given custom emoji.
  • !emdownloadserver - Downloads all custom emojis from the server and sends them as a zip file.
  • !emdownload - Downloads a specific custom emoji or sticker and puts it in a zip file.
  • !remove-emoji - Removes a single custom emoji from the server.
  • !remove-all-emojis - Removes all custom emojis from the server with a confirmation button.
Onboarding Commands
  • !onboarding_setup - Setup onboarding for the server.
  • !onboarding_role_menu - Setup role menu for the server.
NSFW Commands
  • !rule34 <query> - Search for images on rule34.xxx
  • !gelbooru <query> - Search for images on gelbooru.com

To-Do

  • Fix the AI response speed
  • Add a leveling system
  • Add reaction roles
  • Add custom per server commands
  • Add slash command support
  • Add a qotd feature
  • Add more gambling commands
  • Add a dashboard?

About

Niko is a easy to use ai chatbot for discord that includes many different features and commands as well as a modular cog system and regular updates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published