3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 08:45:03 +00:00

Fix mispelling of extension

https://en.wiktionary.org/wiki/extention
This commit is contained in:
Commandtechno 2021-06-29 21:50:01 -05:00 committed by GitHub
parent a9e0466e33
commit 59ad7a22db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ export const JumboCmd = utilityCmd({
const size = config.jumbo_size > 2048 ? 2048 : config.jumbo_size; const size = config.jumbo_size > 2048 ? 2048 : config.jumbo_size;
const emojiRegex = new RegExp(`(<.*:).*:(\\d+)`); const emojiRegex = new RegExp(`(<.*:).*:(\\d+)`);
const results = emojiRegex.exec(args.emoji); const results = emojiRegex.exec(args.emoji);
let extention = ".png"; let extension = ".png";
let file; let file;
if (!isEmoji(args.emoji)) { if (!isEmoji(args.emoji)) {
@ -50,19 +50,19 @@ export const JumboCmd = utilityCmd({
if (results) { if (results) {
let url = "https://cdn.discordapp.com/emojis/"; let url = "https://cdn.discordapp.com/emojis/";
if (results[1] === "<a:") { if (results[1] === "<a:") {
extention = ".gif"; extension = ".gif";
} }
url += `${results[2]}${extention}`; url += `${results[2]}${extension}`;
if (extention === ".png") { if (extension === ".png") {
const image = await resizeBuffer(await getBufferFromUrl(url), size, size); const image = await resizeBuffer(await getBufferFromUrl(url), size, size);
file = { file = {
name: `emoji${extention}`, name: `emoji${extension}`,
file: image, file: image,
}; };
} else { } else {
const image = await getBufferFromUrl(url); const image = await getBufferFromUrl(url);
file = { file = {
name: `emoji${extention}`, name: `emoji${extension}`,
file: image, file: image,
}; };
} }