mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 23:23:08 -04:00
clean up some todos, add favicon helper
This commit is contained in:
parent
22e9b463a2
commit
7153c3ddaa
13 changed files with 32 additions and 31 deletions
|
@ -1668,7 +1668,6 @@ module.exports.MESSAGE_BLOCK_REASONS = Object.freeze({
|
|||
message: "the server's AutoMod setup",
|
||||
support_article: 4421269296535
|
||||
},
|
||||
// TODO: Handle permissions properly, this works as a "hack" for now.e
|
||||
50013: {
|
||||
message: "the channel's permission setup",
|
||||
support_article: 10543994968087
|
||||
|
|
|
@ -40,6 +40,16 @@ module.exports.iconAsEmojiObject = function(icon){
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a favicon image via google s2
|
||||
* @param {string} url Url
|
||||
* @param {Number} size Favicon Size
|
||||
* @returns {string} Favicon URL
|
||||
*/
|
||||
module.exports.favicon = function(url, size = 256){
|
||||
return `https://www.google.com/s2/favicons?domain=${encodeURIComponent(url)}&sz=${size}`
|
||||
}
|
||||
|
||||
module.exports.weatherIcon = function(icon){
|
||||
if(!_iconExists("weather_" + icon)) return _icon("calendar");
|
||||
return _icon("weather_" + icon)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue