Code Monkey home page Code Monkey logo

bb-bot's Introduction

BB.Bot's banner image.

๐Ÿค– BB.Bot

๐Ÿ”’ Moderation | ๐ŸŽต HQ Music Streaming | ๐Ÿ˜† Memes | โญ Reaction Roles | โ“ Polls

Powered by discord.py and GCP, BB.Bot is the bot for you.



As of May 4, 2022, the development, maintenance, and support for BB.Bot has come to an end.

BB.Bot is a Discord bot powered by Python and GCP's Compute Engine. Featuring 24/7 uptime, HQ music streaming, admin commands, and more, BB.Bot will bring your server to life. Available for free, our bot comes with no additional costs and long-term support.

  • Click here to invite BB.Bot to your server.
  • Click here to join our Discord server.
  • Click here for self-hosting instructions.
  • Click here for information about contributing.

Currently, BB.Bot 2.0.0 is in development. If you're thinking of contributing, please do so on the release/v2.0.0 branch.

๐Ÿ“ข Commands List

  • We use ...argument to denote a list of arguments, like argument a, argument b, etc...
  • We use argument? to denote an optional argument. You can use the command with or without one.

๐Ÿงญ Contents

๐Ÿ”– Help Commands

~help

Sends an embed containing a list of commands and categories.
You can use ~help <command> or ~help <category> to see more information.

~docs

Sends an embed linking to this page.

๐Ÿ”‘ Admin Commands

~clear number of messages?

Clears a specified number of messages from a text channel. Using the command on its own will clear all messages
Requires: Manage Messages

~blacklist | ~bladd ...words?

Allows the user to choose words to ban on the server with a dropdown menu.
Requires: Manage Messages

โ— Optionally, you can type words after the command if you'd prefer not to use the dropdown.

~clearblacklist | ~blclear

Clears the blacklist for the server.
Requires: Manage Messages

~showblacklist | ~blshow

Shows the blacklist for the server.
Requires: Manage Messages

โš ๏ธ Other users will be able to see the words on the list. Only use this in an admin/mod-only channel.

~blacklistremove | ~blrem ...words?

Allows the user to choose words to remove from the blacklist with a dropdown menu.
Requires: Manage Messages

โ— Optionally, you can type words after the command if you'd prefer not to use the dropdown.

~kick member reason?

Kicks a specified user from the server.
Requires: Kick Members

~ban member reason?

Bans a specified user from the server.
Requires: Ban Members

~softban member number of days reason?

Temporarily bans a specified user from the server.
Requires: Ban Members

โš ๏ธ It is not recommended to use this when self-hosting, unless your bot will be running 24/7.

~unban member

Unbans a specified user from the server.
Requires: Ban Members

๐Ÿ”Š Music Commands

~connect | ~join

Joins the VC you're currently in.

๐Ÿ’ฟ When you use play, the bot will join automatically before playing, so this isn't needed most of the time.

~play | ~p song to search for

Searches YouTube for a song and then plays the top result.

~pause | ~ps

Pauses the song currently playing if there is one.

~resume | ~r

Resumes the song currently playing if there's one currently paused.

~skip | ~s

Skips the song currently playing if there is one.

~queue | ~q | ~songs

Shows a list of songs that are queued.

~nowplaying | ~np

Shows the song currently playing if there is one.

~volume | ~vol volume as a percentage

๐ŸŽง Tip: You can use this command to have finer control over volume - you can set the volume to 8.78, for instance.

Adjust the volume of the music player.

~stop | ~del

Stops the music player and clears all existing songs from the queue.

โš ๏ธ This command kicks the bot from the VC.

๐ŸŒŸ Role Commands

~reactrole | ~crr emoji @role message

Creates an embed that users can react to for a role.
Requires: Manage Roles

~removereactrole | ~rrr @role

Deletes all reaction role messages for a particular role.
Requires: Manage Roles

๐Ÿ“’ Misc Commands

โ“ Currently, we're testing out slash commands for this category.

~choose ...options or /choose ...options

Randomly chooses an option from a list. Use quote marks "" around the options if they are longer than one word.

โš ๏ธ /choose does not currently support choices with multiple words.

~meme or /meme

Sends a random meme from Reddit.

~poll yes/no question or /poll yes/no question

Creates a poll that users can react with yes or no to.

~twitch streamer name or /twitch streamer name

Gets information about a Twitch stream if the streamer is currently streaming.

~echo text or /echo text

Repeats a message in a text channel.

~ping or /ping

Shows your current ping/latency in milliseconds.

~youtube | ~yt search term or /youtube search term

Searches YouTube for a video and sends you a link to it. You can choose to view it on YouTube or in Discord.

๐Ÿ’ก Info Commands

โ“ Just like misc commands, we're also testing out slash commands for this category.

~joined @member? or /joined @member?

Shows the join date of a member on a server. If no member is specified, it shows your join date.

~toprole @member? or /toprole @member?

Shows a member's highest ranking role on a server. If no member is specified, it shows your top role.

~permissions | ~perms @member? or /permissions @member?

Shows the permissions a member has on a server. If no member is specified, it shows your permissions.

๐Ÿš€ Self Hosting

How to set up BB.Bot for self-hosting, step by step.

โš ๏ธ For development versions of the bot, the prefix is '?'. This is so that we don't get the main & dev versions mixed up!

  • Click here for more information on installing Python.
  • Click here for more information on setting up a Discord bot using the Discord Developer Portal.
  • Click here for more information on registering a Twitch API application.

๐Ÿ”– Prerequisites

  • Python 3.10+
  • A Discord API application with a Bot user, with:
    • All priveleged gateway intents
    • Administrator permissions
    • bot and applications.commands scopes.
  • A registered Twitch API application.

โณ Installing

  1. Install a .ZIP from the releases page.
  2. Extract it to your preferred file location.
  3. Create a file in the root directory called .env. It should look like this:
TOKEN=<Your Discord Bot Token>
TEST_GUILD_ID=<Your Server's ID. This is optional>
TWITCH_CLIENT_ID=<Your Twitch Client ID>
TWITCH_CLIENT_SECRET=<Your Twitch Client Secret>

๐Ÿ”Œ Running

๐Ÿง Linux/UNIX
  • Go to the root directory and run chmod +x scripts/start.sh.
  • Then run the script using ./scripts/start.sh.
๐Ÿ  Windows
  • Press Windows + X.
  • Choose Windows PowerShell (Admin).
  • Go to the root directory and run Set-ExecutionPolicy Bypass.
  • Finally, run .\scripts\start.ps1.

bb-bot's People

Contributors

bjr29 avatar bubblegumzen avatar v0idzdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bb-bot's Issues

Error while running script.ps1

Traceback (most recent call last):
File "C:\Users\user\Desktop\YMT\bb-bot-master\main.py", line 50, in
asyncio.run(main())
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
return future.result()
File "C:\Users\user\Desktop\YMT\bb-bot-master\main.py", line 41, in main
async with client:
AttributeError: aenter

TypeError: unsupported operand type(s) for |: 'type' and 'type'

C:\Users\DREAMFYRE5\Desktop\bb-bot>python main.py
Traceback (most recent call last):
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\main.py", line 9, in <module>
    from client import Client, get_prefix
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\client\__init__.py", line 1, in <module>
    from .client_class import Client
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\client\client_class.py", line 8, in <module>
    from utils import Cache, Twitch
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\utils\__init__.py", line 1, in <module>
    from .buttons import *
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\utils\buttons\__init__.py", line 2, in <module>
    from .view_youtube_button import ViewYoutubeButton
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\utils\buttons\view_youtube_button.py", line 7, in <module>
    class ViewYoutubeButton(ui.View):
  File "C:\Users\DREAMFYRE5\Desktop\bb-bot\utils\buttons\view_youtube_button.py", line 13, in ViewYoutubeButton
    self, url: str, ctx: commands.Context | discord.Interaction, *, timeout=None
TypeError: unsupported operand type(s) for |: 'type' and 'type'

On message event throws an exception after adding the ~blclear command

image
After adding the ~blclear command, the on_message_event in JSONFileCleaner throws an exception.

Potential Fixes

  • Check if the message was deleted by the bot at the start of the method, and if it was, return.
  • (Bad fix, but it'll work) Simply add a *args parameter in the method definition, so it doesn't throw an error due to having too many arguments.

403 Forbidden when using the ~reactrole command

When using the ~reactrole command, the bot generates a reaction role embed with no issues. However, when a user actually reacts to the role, the following exception is raised.

image
Currently, I have been able to fix the error by placing the bot's role above the reaction role, and it works fine. Is there any other way to fix this issue that makes it easier for the user?

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.