update buttons to use applocation owned emoji

This commit is contained in:
bignutty 2024-08-08 22:03:31 +02:00
parent cb1fcf9935
commit ea83bdaca1
2 changed files with 18 additions and 16 deletions

View file

@ -212,6 +212,21 @@ module.exports.ICONS = Object.freeze({
"failiure_simple": "<:ico_cross:1263594899048235100>"
})
module.exports.MUSIC_PLATFORM_ICONS = Object.freeze({
"amazonStore": "1271168898603159554",
"amazonMusic": "1271168908182945842",
"appleMusic": "1271168916810498131",
"deezer": "1271168925652095097",
"itunes": "1271168933495574582",
"napster": "1271168944094318673",
"pandora": "1271168950784491601",
"soundcloud": "1271168959814832160",
"spotify": "1271168976755363840",
"tidal": "1271169001158082624",
"youtube": "1271169012763721809",
"youtubeMusic": "1271169027124760736"
})
module.exports.GUILD_FEATURE_ICONS_REDESIGN = Object.freeze({
"ActivitiesIcon": "<:ico_d_activities:1263595238929334272>",
"AnnouncementsIcon": "<:ico_d_announcements:1263595270684545205>",

View file

@ -1,29 +1,16 @@
const MUSIC_PLATFORMS = {
"amazonStore": "914614653479428177",
"amazonMusic": "914624582302982194",
"deezer": "914614652644761650",
"appleMusic": "914615427009744927",
"itunes": "914614654964211722",
"napster": "914614654595133481",
"pandora": "914614655115218986",
"soundcloud": "914614653076791306",
"spotify": "914614653122932817",
"tidal": "914614653479428176",
"youtube": "914614653563310130",
"youtubeMusic": "914614653663989781"
}
const { MUSIC_PLATFORM_ICONS } = require("#constants");
module.exports.renderMusicButtons = function(platforms){
let btns = [];
for(const k of Object.keys(platforms)){
let s = platforms[k]
if(MUSIC_PLATFORMS[k]){
if(MUSIC_PLATFORM_ICONS[k]){
btns.push(
{
custom_id: k.toLowerCase(),
style: 5,
url: s.url,
emoji: { id: MUSIC_PLATFORMS[k]},
emoji: { id: MUSIC_PLATFORM_ICONS[k]},
type: 2
}
)