... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Note, this file is written by cloud-init on first boot of an instance | |
## modifications made here will not survive a re-bundle. | |
## if you wish to make changes you can: | |
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg | |
## or do the same in user-data | |
## b.) add sources in /etc/apt/sources.list.d | |
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py | |
# Copyright (C) 2021 Tulir Asokan | |
import asyncio | |
import hashlib | |
import inspect | |
import logging | |
import math | |
import os | |
from collections import defaultdict | |
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node.js versions pre-v0.18.0 do not support the fetch api and require a polyfill | |
// const fetch = require('node-fetch'); | |
fetch( | |
'https://discordapp.com/api/webhooks/738983040323289120/mzhXrZz0hqOuUaPUjB_RBTE8XJUFLe8fe9mgeJjQCaxjHX14c3SW3ZR199_CDEI-xT56', | |
{ | |
method: 'post', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
from discord.ext import commands | |
import sys, traceback | |
"""This is a multi file example showcasing many features of the command extension and the use of cogs. | |
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic | |
understanding and platform for creating your own bot. | |
These examples make use of Python 3.6.2 and the rewrite version on the lib. |
First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.