Skip to content

Tranquil-M/CatBot-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introducing...

CatBot Source!

This repository contains the source code to my discord bot, CatBot!

Table of contents:

Categories What's shown?
What can it do? What can CatBot do?
Installation Directions to clone and use this repository!
Used Python Packages All pip used in this repo!

CatBot has several amazing commands/features, so let's go over all of them right now!

Passive Features

  • Statuses
          CatBot shuffles through a library of statuses, all of which are held in cogs/bot_statuses.txt. Adding new statuses is simple, just put some new text on a new line and call it a day! It will shuffle through them every 2 minutes.

  • Syncing
        To avoid being rate limited, CatBot contains one context command, sync, which can be called using !sync on any discord channel. You must be the owner of your application in order for it to function. The sync command syncs together changes to slash commands globally, and those changes are applied after refreshing discord.

  • Auditing
        Catbot automatically tracks all slash commands and creates an audit channel if it doesn't exist already. Logs are sent into this channel containing the timestamp the command was ran, and who ran it. This channel is only visible to people with moderation permissions.

  • Error Handling
        Any errors CatBot encounters are sent to the user executing the command with an ephemeral, meaning that only the user can see the error and report it when necessary.

  • Member Joining/Leaving
        Upon new members joining or leaving the guild/server, CatBot will either welcome the user with a cute little graphic or cry uncontrollably, begging for the person to return to them if they choose to leave.

Join Leave
member_join member_leave

Testing Commands

  • Pinging
        The ping command returns the latency in milliseconds betwen the bot and the script. This is handy if you don't have access to logs and your bot is running slowly.

Moderation

  • Banning/Unbanning
        CatBot possesses the ability to banish users to the shadow realm and back. While the ban command does exist by default on discord, unbanning does not. Like, why? It's really useful! So users can now be easilly banned/unbanned with just their discord username through CatBot.

  • Kicking
        For unity, CatBot contains the ability to push people off the plank with just their username.

  • Muting/Unmuting
        When someone get's a little too rowdy, you can easily mute them for any given amount of time. You can also unmute them before their sentence ends just in case. This command utilizes discord's timeout function.

  • History Clearing
        If your chat messages is too much of a hassle to delete, then you can easily clear chat history with the clear command! You can clear up to 100 messages at a time.

Clearing
clearing

Funny Commands

  • PetPet
        Ever wanted to show your ever-burning affection for your friends on discord? No? Well, just in case you want to CatBot really loves to pet people! You can choose to either pet a specific user, or leave it unspecified to pet someone at random.
PetPet
pet
  • Meow
        What's a cat if it doesn't meow? The meow command tells CatBot to let out a cute little meow to ease your day. All sound affects are recorded and edited by my friends.

  • Memes
        Everybody needs some humor in their life! The meme command grabs a random, SFW, meme from the first 500 entries on r/memes.

Memes
meme
  • Cats
        Do you like-- no, love looking at cat pictures? I mean, that's what the internet is built on! The cats command grabs up to 10 random cats from the CAAS (Cats as a Service) API.
Cats Limit
cats_cmd cats_limit
  • Slap
        Feeling a little mischeivous? Who's stopping you from taking it up a notch? Specify a user and a reason to slap them! 👏👏👏
        Leave the user unspecified to randomize who you slap.
Slap
slap
  • Mimic
        Make CatBot say anything with the mimic command! Whatever you say, CatBot will mimic.

  • 8Ball
        Ask CatBot any question, and they will return an 8Ball-like answer.

Before we can install this script, you must first create a discord application. This video is a great and simple tutorial to get you started! It covers making a basic discord bot in node.js, however this project is written with discord.py, so the programming itself is different here.

  1. Clone this repository into your home directory and cd into it

    git clone https://github.com/Tranquil-M/CatBot-source; cd CatBot-source
  2. Create a file to house your token

    1. Create the file

      Linux/MacOS
      touch token.env
      Windows
      echo. > token.env
    2. Use your favorite code editor to add this simple line

      TOKEN=<Your Token Here>
      
  3. Install python packages through pip

    python -m pip install -r requirements.txt

Caution

When using Arch based distributions of linux, install your pip packages through a virtual environment to avoid system-wide python conflicts. While rare, it does happen because Arch uses python for some of it's core scripts. Virtual environments must be initiated to use their installed pip packages.

ko-fi

About

I've always wanted to make some kind of interactive program. So why not try to make a discord bot?

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Sponsor this project

Contributors

Languages