mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-13 02:20:18 +00:00
1 line
196 KiB
JavaScript
1 line
196 KiB
JavaScript
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Discord=t():e.Discord=t()}(window,(function(){return function(e){var t={};function s(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=e,s.c=t,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(i,n,function(t){return e[t]}.bind(null,n));return i},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=81)}([function(e,t,s){"use strict";(function(e){const i=t.Package=s(47),{Error:n,RangeError:r}=s(3),o=t.browser="undefined"!=typeof window;t.DefaultOptions={shardCount:1,messageCacheMaxSize:200,messageCacheLifetime:0,messageSweepInterval:0,fetchAllMembers:!1,disableMentions:"none",partials:[],restWsBridgeTimeout:5e3,restRequestTimeout:15e3,retryLimit:1,restTimeOffset:500,restSweepInterval:60,presence:{},ws:{large_threshold:250,compress:!1,properties:{$os:o?"browser":e.platform,$browser:"discord.js",$device:"discord.js"},version:6},http:{version:7,api:"https://discordapp.com/api",cdn:"https://cdn.discordapp.com",invite:"https://discord.gg"}},t.UserAgent=o?null:`DiscordBot (${i.homepage.split("#")[0]}, ${i.version}) Node.js/${e.version}`,t.WSCodes={1e3:"WS_CLOSE_REQUESTED",4004:"TOKEN_INVALID",4010:"SHARDING_INVALID",4011:"SHARDING_REQUIRED",4013:"INVALID_INTENTS",4014:"DISALLOWED_INTENTS"};const a=["webp","png","jpg","gif"],c=Array.from({length:8},(e,t)=>2**(t+4));function l(e,{format:t="webp",size:s}={}){if(t&&!a.includes(t))throw new n("IMAGE_FORMAT",t);if(s&&!c.includes(s))throw new r("IMAGE_SIZE",s);return`${e}.${t}${s?`?size=${s}`:""}`}function h(e){let t=Object.create(null);for(const s of e)t[s]=s;return t}t.Endpoints={CDN:e=>({Emoji:(t,s="png")=>`${e}/emojis/${t}.${s}`,Asset:t=>`${e}/assets/${t}`,DefaultAvatar:t=>`${e}/embed/avatars/${t}.png`,Avatar:(t,s,i="webp",n,r=!1)=>(r&&(i=s.startsWith("a_")?"gif":i),l(`${e}/avatars/${t}/${s}`,{format:i,size:n})),Banner:(t,s,i="webp",n)=>l(`${e}/banners/${t}/${s}`,{format:i,size:n}),Icon:(t,s,i="webp",n,r=!1)=>(r&&(i=s.startsWith("a_")?"gif":i),l(`${e}/icons/${t}/${s}`,{format:i,size:n})),AppIcon:(t,s,{format:i="webp",size:n}={})=>l(`${e}/app-icons/${t}/${s}`,{size:n,format:i}),AppAsset:(t,s,{format:i="webp",size:n}={})=>l(`${e}/app-assets/${t}/${s}`,{size:n,format:i}),GDMIcon:(t,s,i="webp",n)=>l(`${e}/channel-icons/${t}/${s}`,{size:n,format:i}),Splash:(t,s,i="webp",n)=>l(`${e}/splashes/${t}/${s}`,{size:n,format:i}),TeamIcon:(t,s,{format:i="webp",size:n}={})=>l(`${e}/team-icons/${t}/${s}`,{size:n,format:i})}),invite:(e,t)=>`${e}/${t}`,botGateway:"/gateway/bot"},t.Status={READY:0,CONNECTING:1,RECONNECTING:2,IDLE:3,NEARLY:4,DISCONNECTED:5,WAITING_FOR_GUILDS:6,IDENTIFYING:7,RESUMING:8},t.VoiceStatus={CONNECTED:0,CONNECTING:1,AUTHENTICATING:2,RECONNECTING:3,DISCONNECTED:4},t.OPCodes={DISPATCH:0,HEARTBEAT:1,IDENTIFY:2,STATUS_UPDATE:3,VOICE_STATE_UPDATE:4,VOICE_GUILD_PING:5,RESUME:6,RECONNECT:7,REQUEST_GUILD_MEMBERS:8,INVALID_SESSION:9,HELLO:10,HEARTBEAT_ACK:11},t.VoiceOPCodes={IDENTIFY:0,SELECT_PROTOCOL:1,READY:2,HEARTBEAT:3,SESSION_DESCRIPTION:4,SPEAKING:5,HELLO:8,CLIENT_CONNECT:12,CLIENT_DISCONNECT:13},t.Events={RATE_LIMIT:"rateLimit",CLIENT_READY:"ready",GUILD_CREATE:"guildCreate",GUILD_DELETE:"guildDelete",GUILD_UPDATE:"guildUpdate",GUILD_UNAVAILABLE:"guildUnavailable",GUILD_AVAILABLE:"guildAvailable",GUILD_MEMBER_ADD:"guildMemberAdd",GUILD_MEMBER_REMOVE:"guildMem
|