Skip to content

Instantly share code, notes, and snippets.

View spinfish's full-sized avatar
🙂
RIP discord.py

alex spinfish

🙂
RIP discord.py
View GitHub Profile
@D-Brox
D-Brox / classfinder2.py
Last active February 13, 2024 17:18 — forked from Davr1/classfinder.py
import json
import re
from operator import itemgetter
import requests
from itertools import combinations
def best_similarity(master, candidates):
counts = [0] * len(candidates)
for candidate_index, candidate in enumerate(candidates):
for item in candidate:
@XuaTheGrate
XuaTheGrate / customcommands.py
Created November 27, 2020 04:10
Another custom command handler
"""
The MIT License (MIT)
Copyright (c) 2020 XuaTheGrate
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
(lambda YTDLSource, coroutine, config, discord, random, math, re, logging, _import, sqlite3, asyncio, token, commands, regex, bot: [logging.basicConfig(level=logging.INFO),bot.load_extension("jishaku"),bot.event(coroutine(lambda: print("Ready!"))),bot.command(name="hello")(coroutine(lambda ctx: ctx.send("hello world"))),(lambda mention:(lambda temp_command: [setattr(temp_command, "__annotations__", {"user": discord.Member}),setattr(temp_command, "_doc__", "mentions someone"),setattr(mention, "callback", temp_command),mention.error(coroutine(lambda ctx, error: ctx.send("error" if not isinstance(error, commands.MissingRequiredArgument) else "no `user` arg, please pass one, thank u"))),])(lambda ctx, user: ctx.send(user.mention)))(bot.command(name="mention")(coroutine(lambda ctx, user: ()))),bot.command(name="8ball")(coroutine(lambda ctx, *, args: ctx.send(random.choice(["yes", "no", "idk", "shrug"])))),bot.command(name="quad")(coroutine(lambda ctx, *, args: ctx.send((lambda match: f"{-int(match[2])+math.sqrt((i
(lambda sqlite3, asyncio, token, commands, regex, bot: [
globals().update(set_var=lambda k, v: globals().__setitem__(k, v)),
set_var("_import", lambda module: set_var(module, __import__(module))), _import("config"), _import("discord"),
_import("random"), _import("math"), _import("re"), _import("logging"), logging.basicConfig(level=logging.INFO),
bot.load_extension("jishaku"), bot.command(name="hello")(asyncio.coroutine(lambda ctx: ctx.send("hello world"))),
set_var("mention", bot.command(name="mention")(asyncio.coroutine(lambda ctx, user: ()))),
set_var("temp_command", lambda ctx, user: ctx.send(user.mention)),
setattr(temp_command, "__annotations__", {"user": discord.Member}),
setattr(temp_command, "_doc__", "mentions someone"), setattr(mention, "callback", temp_command), mention.error(
asyncio.coroutine(lambda ctx, error: ctx.send("error" if not isinstance(error,
@matthewzring
matthewzring / markdown-text-101.md
Last active July 22, 2024 23:14
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:

@ygra
ygra / Get-SpotlightImages.ps1
Created November 16, 2016 10:05
A small PowerShell script to save Windows 10 lock screen images to a more accessible location.
$files = gci $Env:LocalAppData\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets |
where Length -gt 1kb
if ($files) {
$shell = New-Object -ComObject Shell.Application
$folder = "$Env:USERPROFILE\Pictures\Spotlight"
if (!(Test-Path $folder)) { mkdir $folder }
$files | % {
$_ | Copy-Item -Destination $folder\$_.jpg
Get-Item $folder\$_.jpg
} | % {