mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 15:13:04 -04:00
icon redesign
This commit is contained in:
parent
a4df6550cd
commit
6b4e0f3347
19 changed files with 162 additions and 76 deletions
|
@ -12,7 +12,7 @@ function createDictionaryPage(context, result, word){
|
|||
if(result.phonetic) phon = `\n*${result.phonetic}*`
|
||||
|
||||
let e = createEmbed("default", context, {
|
||||
description: `${icon("book")} **${link(`https://en.wiktionary.org/wiki/${encodeURIComponent(word.word)}`, word.word, "Definition on Wiktionary")}**`,
|
||||
description: `${icon("definition")} **${link(`https://en.wiktionary.org/wiki/${encodeURIComponent(word.word)}`, word.word, "Definition on Wiktionary")}**`,
|
||||
fields: []
|
||||
})
|
||||
|
||||
|
@ -28,7 +28,7 @@ function createDictionaryPage(context, result, word){
|
|||
defItms.push(d.definition, citation(ref, d.src))
|
||||
if(d.examples) defItms.push(`\n ${icon("message")} *${d.examples.join(`*\n ${icon("message")} *`)}*`)
|
||||
// Synonyms are limited to 5 to prevent overflow
|
||||
if(d.synonyms) defItms.push(`\n ${iconPill("book", "Synonyms")} ${d.synonyms.splice(0, 5).map((s)=>smallPill(s)).join(' ')}`)
|
||||
if(d.synonyms) defItms.push(`\n ${iconPill("definition", "Synonyms")} ${d.synonyms.splice(0, 5).map((s)=>smallPill(s)).join(' ')}`)
|
||||
|
||||
ref++;
|
||||
if([...defDesc, defItms.join(' ')].join('\n\n').length >= 1024) continue;
|
||||
|
|
|
@ -80,7 +80,7 @@ module.exports = {
|
|||
if(matches[0].animated) form = '.gif'
|
||||
|
||||
let tagline = ''
|
||||
if(context.guild.emojis.find((e)=>e.id == matches[0].id)) tagline = `\n${icon("house")} This emoji is from ${bold(context.guild.name)}`
|
||||
if(context.guild.emojis.find((e)=>e.id == matches[0].id)) tagline = `\n${icon("home")} This emoji is from ${bold(context.guild.name)}`
|
||||
|
||||
return editOrReply(context, createEmbed("default", context, {
|
||||
description: `${iconPill("emoji", `:${matches[0].name}:`)} ${highlight(`(${matches[0].id})`)}${tagline}`,
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
// Get Test Config
|
||||
let LIMITED_TEST_GUILDS;
|
||||
if(process.env.TESTING_SERVER_IDS) LIMITED_TEST_GUILDS = process.env.TESTING_SERVER_IDS.split(';')
|
||||
let LIMITED_TEST_CHANNELS;
|
||||
if(process.env.TESTING_CHANNEL_IDS) LIMITED_TEST_CHANNELS = process.env.TESTING_CHANNEL_IDS.split(';')
|
||||
let LIMITED_TEST_USERS;
|
||||
if(process.env.TESTING_USER_IDS) LIMITED_TEST_USERS = process.env.TESTING_USER_IDS.split(';')
|
||||
|
||||
function canUseLimitedTestCommands(context){
|
||||
if(LIMITED_TEST_GUILDS && LIMITED_TEST_GUILDS.includes(context.guild.id)) return true;
|
||||
if(LIMITED_TEST_CHANNELS && LIMITED_TEST_CHANNELS.includes(context.channel.id)) return true;
|
||||
if(LIMITED_TEST_USERS && LIMITED_TEST_USERS.includes(context.user.id)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
canUseLimitedTestCommands
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue