Skip to content

Instantly share code, notes, and snippets.

View SGA-A's full-sized avatar
💫
Learning

Geomatic SGA-A

💫
Learning
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active July 17, 2024 11:23
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@matthewzring
matthewzring / markdown-text-101.md
Last active July 16, 2024 20:50
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@Soheab
Soheab / API's.md
Last active June 18, 2024 00:09
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.

@ZipFile
ZipFile / README.md
Last active July 12, 2024 08:15
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

What is possible?

Slash commands offer a way to integrate your bot commands directly into the Discord UI. However, these commands are still very limited and cannot replace every use-case for now. I'll explain the limitations and possibilities of this new feature a bit here.

Slash Commands work entirely through the Webhook API. Which introduces a number of moderation issues. See the Moderation section below. It also causes some Rate Limit Problems.

Things you can do with slash commands

  • Simple Q/A type commands that just take an input and return an answer
  • Simple commands that have side-effects such as kick/ban/music
@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

@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active July 9, 2024 17:13
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.