Skip to content

Instantly share code, notes, and snippets.

View LeoCx1000's full-sized avatar

Leonardo LeoCx1000

  • Italy
  • 17:59 (UTC +02:00)
View GitHub Profile
@LeoCx1000
LeoCx1000 / .README.md
Last active May 20, 2025 19:22
Mentionable CommandTree implementation to allow mentioning slash commands in discord.py

discord.py MentionableTree implementation

My implementation of a CommandTree subclass which allows for finding a mention for a given app command.

How to use?

Just copy the entire third file into a new python file of your project, and import MentionableTree from it.

You can also use git clone [gist link] folder_name and then from folder_name import MentionableTree

Multiple concurrencies

Here is an example on how to use commmands.MaxConcurrency for multiple bucket types. If you want to add more concurrencies, you will need to add more try/except blocks and in each one's except statement you need to release all the previous concurrencies that you have acquired.

Note

Found a bug? Left a comment? Please, ping me (@leocx1000) in the discord.py support server if I haven't replied. Sometimes I may miss comments here, though I try to be attentive.

@motorailgun
motorailgun / idea.md
Last active April 11, 2025 11:36
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@lykn
lykn / buttons.md
Last active June 14, 2025 20:07
A gist which shows/tells you how to make buttons using discord.py v2(version 2.0.0a)

Note: Before we go any further. Let me make this real clear that the following gist uses the OFFICIAL discord.py library and not forks like discord_components, nextcord, etc... So when your using this code but a different library and fuck up don't comment something mean or go to a help channel in the server and say "this gist is misleading" or "bad gist who wrote this" when your at fault, trust me I'm going to fuck you up😅

Just a reminder^^

Related Links:

DPY's Docs

Discord's Docs

@Soheab
Soheab / API's.md
Last active June 15, 2025 21:18
See here some of the API's you can use in your discord bot or anything

Some APIs for you.

Here are some APIs you can use in your Discord bot or any other project. For any help or questions on how to use one, please contact the owner of the API and not me.

A bigger list of APIs can be found at: https://github.com/public-apis/public-apis


[TOKEN] = API requires a token to access some if not all endpoints.