Skip to content

Instantly share code, notes, and snippets.

@MeguminSama
MeguminSama / Discord Experiments.js
Last active May 28, 2024 13:15
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@InterStella0
InterStella0 / HelpCommand_walkthrough_guide.md
Last active May 28, 2024 04:52
Walkthrough guide on subclassing HelpCommand
@Phxntxm
Phxntxm / custom_commands.py
Last active April 21, 2024 22:42
A pretty simplified way to implement custom commands into your bot.
from discord.ext import commands
# The check to ensure this is the guild used where the command was made
def guild_check(_custom_commands):
async def predicate(ctx):
return _custom_commands.get(ctx.command.qualified_name) and ctx.guild.id in _custom_commands.get(ctx.command.qualified_name)
return commands.check(predicate)
class CustomCommands(commands.Cog):