An overview of all events in Discord.js v14 with examples.
📢 | Last updated: 27 July 2022
ℹ️ | client
references to your client instance.
ℹ️ | The v13 overview can be found here.
""" | |
It took me far longer than necessary to figure out how to use yt-dlp to trim/download a subset of a longer video | |
outside the context of a command line (i.e., directly in Python), so I'm recording it here for posterity. | |
There's no shortage of command-line examples of using `--ppa "ffmpeg_i:[...]`, but the documentation doesn't | |
exactly make it clear how to translate this to the Python version of the options, so here goes. A couple | |
additional quirks come into play too; we'll get to those soon enough. | |
""" | |
import yt_dlp |
An overview of all events in Discord.js v14 with examples.
📢 | Last updated: 27 July 2022
ℹ️ | client
references to your client instance.
ℹ️ | The v13 overview can be found here.
// Welcome to my gist! This is how you can create an invite tracker using JavaScript and Discord.JS! | |
// First we are going to statt off in our ready event. | |
// Create a new Collection called guildInvites and add it to your client | |
// client is the new Client you created in your main file. If you're using an event handler, make sure to pass the client into this file. | |
const { Collection } = require("discord.js"); | |
// Collection is an enhanced Map which we are going to save our invites to. | |
const guildInvites = new Collection(); | |
client.invites = guildInvites; |
Recommendations of unit types per media type:
Media | Recommended | Occasional use | Infrequent use | Not recommended |
---|---|---|---|---|
Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
Run pip install pipenv
to install pipenv
Run pipenv shell
to create an environment, if does not exist, and activate it.
Run pipenv install python_decouple whitenoise dj_database_url Pillow gunicorn
May take a while.
This should create two files: Pipfile
and Pipfile.lock
. Keep them in the project root.