Update packages
This commit is contained in:
parent
a84f332786
commit
34ac7b3380
5 changed files with 361 additions and 162 deletions
|
@ -9,7 +9,7 @@ class AwaitRejoin extends EventEmitter {
|
|||
this.channel = channel;
|
||||
this.rejoined = false;
|
||||
this.ended = false;
|
||||
this.bot = channel.guild ? channel.guild.shard.client : channel._client;
|
||||
this.bot = channel.guild ? channel.guild.shard._client : channel._client;
|
||||
this.listener = (member, newChannel) => this.verify(member, newChannel);
|
||||
this.bot.on("voiceChannelJoin", this.listener);
|
||||
this.bot.on("voiceChannelSwitch", this.listener);
|
||||
|
|
|
@ -132,8 +132,8 @@ export default async (client, cmdMessage, interaction, options, extraReturnTypes
|
|||
// we can get a raw attachment or a URL in the interaction itself
|
||||
if (options) {
|
||||
if (options.image) {
|
||||
const attachment = interaction.data.resolved.attachments[options.image];
|
||||
const result = await getImage(attachment.proxy_url, attachment.url, video, attachment.content_type);
|
||||
const attachment = interaction.data.resolved.attachments.get(options.image);
|
||||
const result = await getImage(attachment.proxyUrl, attachment.url, video, attachment.contentType);
|
||||
if (result !== false) return result;
|
||||
} else if (options.link) {
|
||||
const result = await getImage(options.link, options.link, video, extraReturnTypes, false, null, true);
|
||||
|
|
|
@ -65,7 +65,6 @@ export async function play(client, sound, options, music = false) {
|
|||
if (!options.channel.guild.permissionsOf(client.user.id).has("voiceConnect")) return "I can't join this voice channel!";
|
||||
const voiceChannel = options.channel.guild.channels.get(options.member.voiceState.channelID);
|
||||
if (!voiceChannel.permissionsOf(client.user.id).has("voiceConnect")) return "I don't have permission to join this voice channel!";
|
||||
const playerMeta = players.get(options.channel.guild.id);
|
||||
if (!music && manager.players.has(options.channel.guild.id)) return "I can't play a sound effect while other audio is playing!";
|
||||
let node = manager.getNode();
|
||||
if (!node) {
|
||||
|
@ -94,6 +93,7 @@ export async function play(client, sound, options, music = false) {
|
|||
const playlistTracks = response.playlistInfo.selectedTrack ? sortedTracks : [sortedTracks[0]];
|
||||
queues.set(voiceChannel.guild.id, oldQueue ? [...oldQueue, ...playlistTracks] : playlistTracks);
|
||||
}
|
||||
const playerMeta = players.get(options.channel.guild.id);
|
||||
let player;
|
||||
if (node.players.has(voiceChannel.guild.id)) {
|
||||
player = node.players.get(voiceChannel.guild.id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue