Skip to content

Instantly share code, notes, and snippets.

View bsod2528's full-sized avatar
:electron:
evolving

vishal srivatsava av bsod2528

:electron:
evolving
View GitHub Profile
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active May 18, 2024 14:10
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@InterStella0
InterStella0 / Pagination_walkthrough.md
Last active March 15, 2024 22:02
A walkthrough on action based pagination in discord.py

Pagination Walkthrough in discord.py

In this tutorial I will go through the entire length of pagination in discord.py

I kindly ask you to go through the entire thing, as it is not recommended to skip the subtopics because they are interconnected in some way.

Table Content

@InterStella0
InterStella0 / HelpCommand_walkthrough_guide.md
Last active March 16, 2024 09:29
Walkthrough guide on subclassing HelpCommand
@Soheab
Soheab / API's.md
Last active April 25, 2024 19:48
See here some of the API's you can use in your discord bot or anything

Some API's for you.

See here some of the API's you can use in your discord bot or anything. For any help or questions on how to use one, please contact the owner of the API and not me.

A much bigger list of APIs can be found here


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

The descriptions are mostly copied from the API, sometimes personal or from the dev.

@spinfish
spinfish / subclass_example_and_more.py
Last active March 2, 2023 21:05
Here we have an example of how subclasses work in Python (how to override methods of a parent class), how to set attributes for the subclass, how class methods/static methods work and how they can be useful, and a basic coverage of what the property decorator can do.
class Car:
"""A class written to showcase what instance/static/class methods/properties are."""
# All of the methods defined below (including __init__) will be inherited by subclasses.
# Here in the __init__ constructor there is a positional parameter, `name`,
# followed by two keyword-only arguments (or "kwargs"), `doors` and `max_speed`,
# which have default values of 4 and 150, respectively.
# In Python, any parameters following a * in a function definition will be kwargs.
def __init__(self, name: str = None, *, doors: int = 4, max_speed: int = 150):
@rxaviers
rxaviers / gist:7360908
Last active May 21, 2024 08:52
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: