Skip to content

Instantly share code, notes, and snippets.

View FOCI-DEV's full-sized avatar

F.O.C.I. FOCI-DEV

View GitHub Profile
502 Bad Gateway
nginx/1.14.0
@FOCI-DEV
FOCI-DEV / remove-spaces-emojis-discord
Last active October 29, 2020 00:41
Remove Spaces between Discord Emojis [Desktop Client]
function addCSSRule(sheet, selector, rules, index) {
if ("insertRule" in sheet) {
sheet.insertRule(selector + "{" + rules + "}", index);
} else if ("addRule" in sheet) {
sheet.addRule(selector, rules, index);
}
}
addCSSRule(document.styleSheets[0], "img.jumboable", "margin: auto auto auto 0.0em!important;");
addCSSRule(document.styleSheets[0], "img.emoji", "margin: auto auto auto 0.0em!important;");
@FOCI-DEV
FOCI-DEV / Restructuring Identification's Commands.md
Created February 16, 2018 04:44
Restructuring Identification's Commands


Restructuring Identification’s Custom Commands

(In other words: Changing how commands are named, navigated, and displayed)

Short context: While trying to make an interactive help menu for all the custom commands the server has, I got to the point where I had to decide how to group and list the commands in a way where it’d be intuitive for someone to navigate such a menu. After some thought, I decided it might just be easier and more beneficial to simply restructure the command list entirely. This not only solves the task of sorting the current commands, but also will make it very straightforward to integrate other commands in the future.


Here is what I came up with
import discord
import re
class Gambler:
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True)
async def SetValue(self, ctx):