Skip to content

Instantly share code, notes, and snippets.

View 1x6's full-sized avatar

x 1x6

  • canary wharf
  • 14:10 (UTC +01:00)
View GitHub Profile
// This is a hack, a quick and dirty console script for RT/tweets (with replies) removal w/o API
// To be used in: https://twitter.com/Username/with_replies
// Set your username (without @) below (case-sensitive) to correctly trigger the right Menu
const tweetUser = 'Username'
// BUG, With above we still trigger Menu on some replies but relatively harmless.
// @Hack Implement simple has() for querySelector
const querySelectorHas = function( parent, child ){
#!/usr/bin/env python3
# Recursively generate index.html files for
# all subdirectories in a directory tree
##########################################################################
## ❗️❗️❗️ WARNING: This version is outdated and unmaintained!
## For an up-to-date version with cleaner CSS styling see:
## https://gist.github.com/glowinthedark/625eb4caeca12c5aa52778a3b4b0adb4
##########################################################################
@AwSkies
AwSkies / cooldown_with_whitelist.py
Last active April 13, 2023 17:59
commands with whitelisted cooldowns for discord.py rewrite
import discord
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
bot = commands.Bot(command_prefix = "your prefix here")
token = 'token goes here'
#on ready login message
@bot.event
async def on_ready():
@wilfreddv
wilfreddv / discord_py_cookbook.md
Last active November 2, 2021 20:32
A cookbook for getting started with discord.py rewrite

This is not being maintained and might be outdated. Use at your own risk.

Cookbook for discord.py rewrite

This document contains snippets that I've used and tested. It's not meant to be an official guide, but rather a document for looking up small snippets of code. For an extensive reference on the API, please visit the official documentation.

Contents

@MPThLee
MPThLee / enableDiscordExperiments.js
Last active May 29, 2024 18:20
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@stewartadam
stewartadam / main.py
Last active March 5, 2024 16:02 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re
@Bilka2
Bilka2 / webhook.py
Last active June 3, 2024 10:10
Simple discord webhook with python
import requests # dependency
url = "<your url>" # webhook url, from here: https://i.imgur.com/f9XnAew.png
# for all params, see https://discordapp.com/developers/docs/resources/webhook#execute-webhook
data = {
"content" : "message content",
"username" : "custom username"
}
@EvieePy
EvieePy / music.py
Last active March 7, 2024 21:00
Basic music with playlist support on Rewrite
"""
Please understand Music bots are complex, and that even this basic example can be daunting to a beginner.
For this reason it's highly advised you familiarize yourself with discord.py, python and asyncio, BEFORE
you attempt to write a music bot.
This example makes use of: Python 3.6
For a more basic voice example please read:
https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_voice.py
@theonlytruegod
theonlytruegod / Quizlet Match Hack Code (use tampermonkey chrome extension)
Last active April 20, 2024 12:09
MOST LIKELY NOT WORKING, I AM NO LONGER UPDATING THIS!!!
// ==UserScript==
// @name Quizlet Match Hack
// @namespace Gabe B. Talafous
// @version 1.6
// @description The time will freeze at 0.5 and the answers will be the same color
// @author You
// @match https://quizlet.com/*/*
// @grant none
// @license MIT
// ==/UserScript==
@Painezor
Painezor / Checks.py
Last active April 18, 2024 05:22
Built-in Checks for the commands extension of discord py
@commands.guild_only()
# Command cannot be used in private messages.
@commands.dm_only()
# Command can only be used in private messages.
@commands.is_owner()
# Command can only be used by the bot owner.
@commands.is_nsfw()