Skip to content

Instantly share code, notes, and snippets.

View AnotherTwinkle's full-sized avatar

Fijaj AnotherTwinkle

View GitHub Profile
@SansPapyrus683
SansPapyrus683 / debugging.h
Last active August 29, 2025 14:11
A useful debugging template for C++.
#include <iostream>
#include <vector>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
template <typename T>
std::ostream& operator<<(std::ostream& out, const std::vector<T>& vec) {

Breaking Changes of discord.py 2.0

These are the breaking changes of discord.py version 2.0.

"Breaking change" includes:

  • [R]emoval: a feature is removed.
  • [N]ame changes: a feature is renamed.
  • [B]ehavior: something does not behave the way they did in 1.x.
  • [T]yping: types of arguments, attributes or return values changes in an incompatible way. (e.g. None disallowed for argument)
  • [S]yntax: a syntax previously allowed for an operation is no longer allowed. (e.g. positional only arguments, new required arguments)
(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