A drop-in vanilla discord.py cog to add slash command support with little to no code modifications

Overview

discord.py /slash cog

A drop-in vanilla discord.py cog that acts as a translation layer to add slash command support with little to no code modifications, no forks needed

PyPI - License PyPI PyPI - Status PyPI - Python Version

Features:

  • Automatically generates a command map with argument listing for the entire bot
  • Wraps around existing discord.py Context, almost no code modifications needed
  • Automatic Multi-Instance bot detection (currently, it will only register if there is no shards or the bot runs shard 0)

General TO-DOs & RFCs:

  • Make the cog more modular in order to support more customizations
  • Allow registering guild-specific commands
  • Allow preventing the cog from automatically registering global commands

Unsupported Features (Unsupported by Discord):

  • Translation for Custom checks
  • Translation for @commands.check_any()
  • is_owner (commands currently hidden)
  • is_nsfw (commands currently hidden)
  • *has_permissions (only roles and user IDs are accepted)
  • bot_has_(any)?_role
  • guild_only
  • dm_only

Fork Support:

I personally won't provide support for forks as for simplicity's sake I will be basing this cog on Rapptz/discord.py master v2.0.0a. However, fork-specific pull requests are allowed.

A word though, because everyone is making their own forks of discord.py, I would suggest changing up the readme to include what changes and features the fork has added apart from API parity and maintenance just to make everybody's lives easier.

Usage:

Simply install the pip package with:

pip install -U slash_cog

Then in your bot's cog loader, load the cog (CRITICAL: Load it as the first extension as the cog needs to monkey patch command checks):

bot.load_extension("slash_cog")

P.S. If this project / POC has been useful sponsor me pls, iambroke

You might also like...
An example of using discordpy 2.0.0a to create a bot that supports slash commands

DpySlashBotExample An example of using discordpy 2.0.0a to create a bot that supports slash commands. This is not a fully complete bot, just an exampl

A python library for creating Slack slash commands using AWS Lambda Functions

slashbot Slashbot makes it easy to create slash commands using AWS Lambda functions. These can be handy for creating a secure way to execute automated

An example Music Bot written in Disnake and uses slash commands to operate.

Music Bot An example music bot that is written in Disnake [Maintained discord.py Fork] Disnake Disnake is a maintained and updated fork of discord.py.

Linky bot, A open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

LinkyBot Linky bot, An open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

Support for Competitive Coding badges to add in Github readme or portfolio websites.

Support for Competitive Coding badges to add in Github readme or portfolio websites.

Drop-in Replacement of pychallonge

pychal Pychal is a drop-in replacement of pychallonge with some extra features and support for new Python versions. Pychal provides python bindings fo

MicroStealer - A compact Discord Token Logger/Discord Token Grabber made in only 15 lines of code! Injects into discord for long-term use

๐Ÿ’พ MicroStealer โšก A compact Discord Token Logger/Discord Token Grabber made in o

Free and Open Source Group Voice chat music player for telegram โค๏ธ with button support youtube playback support
Free and Open Source Group Voice chat music player for telegram โค๏ธ with button support youtube playback support

Free and Open Source Group Voice chat music player for telegram โค๏ธ with button support youtube playback support

Cytotron - A unique discord bot like never before. Add it to your server to keep it active, motiviated, and amazing!!

Cytotron - Take your server to the next level Most of the details are in the website. Go to https://cytotron-bot.gq for more information. If that link

Releases(0.0.1)
Owner
marshall
A very mysterious guy.
marshall
Telegram bot for logistic - Telegram bot for logistic

ะ”ะตะผะพะฝัั‚ั€ะฐั†ะธะพะฝะฝั‹ะน ั‚ะตะปะตะณั€ะฐะผ-ะฑะพั‚ ะดะปั ะฝัƒะถะด ั‚ั€ะฐะฝัะฟะพั€ั‚ะฝะพะน ะบะพะผะฟะฐะฝะธะธ ะฆะตะปัŒ ะฟั€ะพะตะบั‚ะฐ ะ ะตะฐะปะธะท

M1chigun 1 Feb 05, 2022
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

ModernBots 1 Jun 27, 2022
BoostIRC - IRC Bot which posts boosts to IRC

BoostIRC Quick Start git clone https://github.com/valcanobacon/BoostIRC.git cd B

7 Dec 23, 2022
A Python Client to View F1TV Content the right way

F1Hub is a terminal application running directly on your computer -- no connection to the website needed* *In theory. As of now, the F1TV website is needed for some content

kodos 3 Jun 14, 2022
Unofficial Meteor Client wiki

Welcome to the Unofficial Meteor Client wiki! Meteor FAQs | A rewritten and better FAQ page. Installation Guide | A guide on how to install Meteor Cli

Anti Cope 0 Feb 21, 2022
python library to the bitly api

bitly API python library Installation pip install bitly_api Run tests Your username is the lowercase name shown when you login to bitly, your access

Bitly 245 Aug 14, 2022
Boto3 code assistance for any API in any IDE, always up to date

botostubs Gives you code assistance for any boto3 API in any IDE. Get started by running pip install botostubs Demo Features PyPI package automaticall

Jeshan Giovanni BABOOA 94 Nov 14, 2022
Spodcast is a caching Spotify podcast to RSS proxy

Spodcast Spodcast is a caching Spotify podcast to RSS proxy. Using Spodcast you can follow Spotify-hosted netcasts/podcasts using any player which sup

Frank de Lange 260 Jan 01, 2023
=>|<= the MsgRoom bot for Windows 96

=|= bot A MsgRoom bot in Python 3 for Windows96.net. The bot joins as =|=, if parameter name_lasts is not true and default_name is =|=. The full

Larry Holst 2 Jun 07, 2022
A discord.py bot template with easy deployment through Github Actions

discord.py bot template A discord.py bot template with easy deployment through Github Actions. You can use this template to just run a Python instance

Thomas Van Iseghem 1 Feb 09, 2022
Google Sheets Python API v4

pygsheets - Google Spreadsheets Python API v4 A simple, intuitive library for google sheets which gets your work done. Features: Open, create, delete

Nithin Murali 1.4k Jan 08, 2023
Definitive Guide to Creating a SQL Database on Cloud with AWS and Python

Definitive Guide to Creating a SQL Database on Cloud with AWS and Python An easy-to-follow comprehensive guide on integrating Amazon RDS, MySQL Workbe

Kenneth Leung 6 Aug 17, 2022
A discord self bot that replies to messages using cleverbot

cleverbot-discord-self A discord self bot that replies to messages using cleverbot Bot will respond to DMs and channels in the channels list. Need to

0 Jan 11, 2022
Benachrichtigungs-Bot fรผr das niedersรคchische Impfportal / Notification bot for the lower saxony vaccination portal

Ein kleines Wochenend-Projekt von mir. Der Bot รผberwacht die REST-API des niedersรคchsischen Impfportals auf freie Impfslots und sendet eine Benachrichtigung mit deinem bevorzugtem Service. Ab da gilt

sibalzer 37 May 11, 2022
A python library for creating selfbots/automating your Nertivia account.

nertivia-selfbot (WIP) A python library for creating selfbots/automating your Nertivia account. how to use Download the nertivia_selfbot folder from t

Ben Tettmar 2 Feb 03, 2022
WIOpy - Walmart Affiliate API Python wrapper

WalmartIO Python Wrapper - WIOpy A python wrapper for the Walmart io API. Only s

6 Nov 14, 2022
A multipurpose, semi-modular Discord bot written in Python with the new discord.py module.

Discord.py Reaction Bot MIRAI KURIYAMA A multipurpose, semi-modular Discord bot written in Python with the new discord.py module. Installing dependenc

1 Dec 02, 2021
Troposphere and shellscript based AWS infrastructure automation creates an awsapigateway lambda with a go backend

Automated-cloudformation-infra Troposphere and shellscript based AWS infrastructure automation. Feel free to clone and edit for personal usage. The en

1 Jan 03, 2022
Fast and multi-threaded script to automatically claim targeted username including 14 day bypass

Instagram Username Auto Claimer Fast and multi-threaded script to automatically claim targeted username. Click here to report bugs. Usage Download ZIP

265 Dec 28, 2022