- Standard and edit snipes
- Display invite info
- Reminders
- Member inspection (Whois)
- Kicks (fetch audit logs to verify)
Ignoring exception in on_command_error | |
Traceback (most recent call last): | |
File "C:\Users\Cyrus\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 312, in _run_event | |
await coro(*args, **kwargs) | |
File "D:\Users\Cyrus\Documents\Code\Python\Bases\bot\cogs\error_handler.py", line 27, in on_command_error | |
raise error | |
File "C:\Users\Cyrus\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke | |
await ctx.command.invoke(ctx) | |
File "C:\Users\Cyrus\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 790, in invoke | |
await self.prepare(ctx) |
kwargs = {"title": "title", "description": "description"} | |
embeds = (discord.Embed(**kwargs), discord.Embed(**kwargs)) | |
values = ("not inline", "inline") | |
for i, inline in enumerate((False, True)): | |
embed = embeds[i] | |
for n in range(1, 7): | |
embed.add_field(name=f"field #{n}", value=values[i], inline=inline) | |
_=await _ctx.send(embed=embed) # replace "_ctx" according to your bot's jishaku underscore settings |
Format: | |
Attribute == Shortcut | |
Attribute ~~ Shortcut (can be equal to) | |
Guild.me == ctx.me (Gives ClientUser in DMs) | |
Command.cog == ctx.cog | |
Message.guild == ctx.guild (Gives None in DMs) | |
commands.Bot() == ctx.bot | |
Message.author == ctx.author (Gives User in DMs) | |
Message.channel == ctx.channel |
import os | |
import discord | |
def get_emoji_format(name: str): | |
guild_obj: discord.Guild = None | |
if os.environ.get("JISHAKU_NO_UNDERSCORE", False): | |
guild_obj = guild |
type QueueKey = { | |
RBXScriptSignal, | |
(...) | |
} | |
local arguments = { [QueueKey]: {any}? } | |
local connections: { [QueueKey]: RBXScriptConnection } = {} | |
local queues: { [QueueKey]: number } = {} | |
"useStore Hook": { | |
"scope": "javascript,typescript,javascriptreact", | |
"prefix": ["use", "usestore"], | |
"body": [ | |
"let ${0:slice} = useStore(state => state.${0:slice});" | |
] | |
}, |
:root { | |
--default-emoji-size: 1.375rem; | |
--default-emoji-jumboable-size: 3rem; | |
--emoji-size: calc(var(--default-emoji-size) * 2); | |
--emoji-jumboable-size: calc(var(--default-emoji-jumboable-size) * 2); | |
} | |
/* Change emoji size */ | |
[class*="messageContent"]:not([class*="repliedTextContent"]) .emoji { | |
height: var(--emoji-size) !important; |
import { useEffect, useState } from "react"; | |
const MOBILE_WIDTH = 1024; | |
export const isDesktop = (limit = MOBILE_WIDTH) => window.innerWidth > limit; | |
export const isMobile = (limit = MOBILE_WIDTH) => window.innerWidth <= limit;2 | |
const useResolutionChecker = ({ desktop, mobile }) => { | |
const [inMobileResolution, setInMobileResolution] = useState(isMobile()); |
# src/utils.py | |
from __future__ import annotations | |
from collections import namedtuple | |
import discord | |
Author = namedtuple("Author", ["name", "url", "icon_url"]) | |
Footer = namedtuple("Footer", ["text", "icon_url"]) | |
Field = namedtuple( |