mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
81 lines
2.1 KiB
TypeScript
81 lines
2.1 KiB
TypeScript
export {}
|
|
|
|
/*
|
|
import { formatImageURL } from '../src/index.js'
|
|
import { decode, encode } from '../src/util/base64.js'
|
|
import { bigintToSnowflake, snowflakeToBigint } from '../src/util/bigint.js'
|
|
import { assertEquals } from './deps.js'
|
|
|
|
/*
|
|
it(
|
|
'[emoji] Create an emoji url',
|
|
ignore: process.env.TEST_ENV === 'UNIT',
|
|
() => {
|
|
const bot = loadBot()
|
|
assertEquals(
|
|
bot.helpers.getEmojiURL(785403373817823272n, false),
|
|
'https://cdn.discordapp.com/emojis/785403373817823272.png'
|
|
)
|
|
assertEquals(
|
|
bot.helpers.getEmojiURL(785403373817823272n, true),
|
|
'https://cdn.discordapp.com/emojis/785403373817823272.gif'
|
|
)
|
|
}
|
|
)
|
|
|
|
it(
|
|
"[guild] format a guild's icon url",
|
|
ignore: process.env.TEST_ENV === 'UNIT',
|
|
() => {
|
|
const bot = loadBot()
|
|
assertEquals(
|
|
bot.helpers.getGuildIconURL(785384884197392384n, 3837424427068676005442449262648382018748n),
|
|
'https://cdn.discordapp.com/icons/785384884197392384/46f50fb412eab14ec455d5cf777154bc.jpg?size=128'
|
|
)
|
|
}
|
|
)
|
|
|
|
it(
|
|
"[guild] format a guild's banner url",
|
|
ignore: process.env.TEST_ENV === 'UNIT',
|
|
() => {
|
|
const bot = loadBot()
|
|
|
|
assertEquals(
|
|
bot.helpers.getGuildBannerURL(613425648685547541n, {
|
|
banner: 3919584870146358272366452115178209474142n
|
|
}),
|
|
'https://cdn.discordapp.com/banners/613425648685547541/84c4964c115c128fb9100952c3b4f65e.jpg?size=128'
|
|
)
|
|
}
|
|
)
|
|
|
|
it(
|
|
"[guild] format a guild's splash url",
|
|
ignore: process.env.TEST_ENV === 'UNIT',
|
|
() => {
|
|
const bot = loadBot()
|
|
assertEquals(
|
|
bot.helpers.getGuildSplashURL(785384884197392384n, 3837424427068676005442449262648382018748n),
|
|
'https://cdn.discordapp.com/splashes/785384884197392384/46f50fb412eab14ec455d5cf777154bc.jpg?size=128'
|
|
)
|
|
}
|
|
)
|
|
|
|
it(
|
|
'[member] format a members avatar url',
|
|
ignore: process.env.TEST_ENV === 'UNIT',
|
|
() => {
|
|
const bot = loadBot()
|
|
|
|
assertEquals(
|
|
bot.helpers.getAvatarURL(130136895395987456n, '8840', {
|
|
avatar: 4055337350987360625717955448021200177333n
|
|
}),
|
|
'https://cdn.discordapp.com/avatars/130136895395987456/eae5905ad2d18d7c8deca20478b088b5.jpg?size=128'
|
|
)
|
|
}
|
|
})
|
|
|
|
*/
|