Skip to content

Instantly share code, notes, and snippets.

View jayktaylor's full-sized avatar

Jayden jayktaylor

View GitHub Profile
@jayktaylor
jayktaylor / discord-perm-no-vanity.js
Created July 12, 2023 16:50
Create extra permanent Discord invite link without re-using vanity URL
/**
* 1. Change the "auth" parameter to your Authorization header (check browser console -> discord.com/api requests on discord.com)
* 2. Change the "channelId" parameter to your target channel ID
* 3. Paste the following code in your browser console while logged in and viewing discord.com
**/
let channelId = '';
let auth = '';
let body = {unique: true, max_uses: 0, max_age: 0};
let headers = {'Content-Type': 'application/json', Authorization: auth}
@jayktaylor
jayktaylor / fandom.md
Last active March 18, 2023 14:48
Removing featured videos on FANDOM

Hiding the videos

Hiding with uBlock Origin

uBlock Origin, unlike AdBlock Plus and other alternatives, doesn't allow companies to pay to whitelist their ads, and it blocks trackers too. Using it will provide the best experience on Wikia, as the majority of ads and slowdowns will be eliminated.

To block videos using uBlock Origin:

  • Click the uBlock Origin icon in your browser
  • Then click 'Open dashboard' (the furthest icon on the right under the power icon)
  • Click 3rd party filters
  • Click the Update now button and then enable uBlock filters - Annoyances
@jayktaylor
jayktaylor / bot.py
Last active March 17, 2017 15:27
MusicBot - Remove bot from server by ID
async def cmd_leaveserver(self, id):
"""
Usage:
{command_prefix}leaveserver <id>
Removes the bot from a specific server via ID
"""
target = self.get_server(id)
if target is None:
raise exceptions.CommandError('The server {} does not exist'.format(id), expire_in=30)
@jayktaylor
jayktaylor / guide.md
Last active April 13, 2022 08:23
Instructions for installing Python 3.5 using pyenv on Debian Jessie

Installing Python 3.5 on Debian Jessie with pyenv

Debian Jessie does not come with the correct Python version out of the box, and instead comes with Python 2. To be able to install Python 3(.5), we have a few options. We could build and install from source, but as per Debian's website, we shouldn't do this. Instead, we will use pyenv, a tool that allows users to switch Python versions easily without breaking their system.

Installing pyenv

To install pyenv, we will use the official installer.

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
@jayktaylor
jayktaylor / bot.py
Created October 3, 2016 15:05
MusicBot - Make restart command broadcast to all servers
async def cmd_restart(self, author, channel):
for s in self.servers:
await self.safe_send_message(s, "Restarting (by {0.name}#{0.discriminator})".format(author))
await self.disconnect_all_voice_clients()
raise exceptions.RestartSignal
@jayktaylor
jayktaylor / bot.py
Created October 3, 2016 15:04
MusicBot - Send all command
async def cmd_sendall(self, args, leftover_args):
"""
Usage:
{command_prefix}sendall <message>
Sends a message to all servers the bot is on
"""
if leftover_args:
args = ' '.join([args, *leftover_args])
for s in self.servers:
await self.safe_send_message(s, args)
@jayktaylor
jayktaylor / bot.py
Last active December 11, 2017 10:07
MusicBot - Ping command
async def cmd_ping(self):
"""
Usage:
{command_prefix}ping
Ping command to test latency
"""
return Response("Pong!")
@jayktaylor
jayktaylor / presence.py
Last active September 28, 2016 13:42
Presence changing command
async def c_presence(self, option=None):
"""
Changes your presence on Discord
{prefix}presence <status>
Leave blank to reset presence to online.
"""
afk = False
@jayktaylor
jayktaylor / generateconfig.py
Last active May 3, 2016 14:29
Script for generating a config for MusicBot-review
"""
Configuration file generator for SexualRhinoceros/MusicBot (review branch)
To use, place this script inside the main directory of the bot and run it
Designed to be a "fool proof" way of configuring the bot
"""
import configparser
import os
import sys
import traceback
@jayktaylor
jayktaylor / dumpfromcache.py
Last active April 21, 2016 23:25
Dumps urls from audio_cache folder into playlist.txt and optionally moves to config/autoplaylist.txt - similar to Borked's pldump
from os import listdir
from os.path import isfile, join
import shutil
files = [f for f in listdir("audio_cache") if isfile(join("audio_cache", f))]
url = "https://www.youtube.com/watch?v="