Skip to content

Instantly share code, notes, and snippets.

@qwertykid
qwertykid / pomelo-count.js
Last active June 8, 2023 16:03
This is some code for the assyst discord bot.
function maxIdx(list) {
let maxNumber = -Infinity;
let maxIndex = -1;
for (let i = 0; i < list.length; i++) {
if (list[i] > maxNumber) {
maxNumber = list[i];
maxIndex = i;
}
}
{js:
var emoji = "{args:0}"
{ignore:
let o = 2
let l = (emoji.length / 2) - 1
if (emoji.startsWith("<:") && emoji.endsWith(">")) {
var url = `https://cdn.discordapp.com/emojis/${emoji.split(":")[2].substr(0,19)}.png`
} else {
let codePoint = emoji.codePointAt(0);
let unicode =
@qwertykid
qwertykid / ping.txt
Created April 13, 2023 18:21
ping command for assyst discord bot
{set:error|`-t ping user (user id)`}{if:{tryarg:0}|~|user|{if:{tryarg:1}|=||{get:error}|<@{arg:1}>}|{get:error}}