mirror of
https://github.com/Art-Portal/April.git
synced 2024-11-16 19:47:34 +01:00
Replace fetching cache for user in applicationopen
Instead fetch guild members
This commit is contained in:
parent
c24626b0f0
commit
78b5377cdb
@ -5,10 +5,10 @@ module.exports = {
|
|||||||
interaction.deferReply({ ephemeral: true });
|
interaction.deferReply({ ephemeral: true });
|
||||||
const embedToSend = interaction.message.embeds[0];
|
const embedToSend = interaction.message.embeds[0];
|
||||||
const userId = interaction.customId.replace("applicationopen_","");
|
const userId = interaction.customId.replace("applicationopen_","");
|
||||||
const member = client.users.cache.find(user => user.id === userId)
|
const member = await interaction.guild.members.fetch(userId);
|
||||||
|
|
||||||
await interaction.guild.channels.create({
|
await interaction.guild.channels.create({
|
||||||
name: `candidature-${member.username}`,
|
name: `candidature-${member.user.username}`,
|
||||||
type: ChannelType.GuildText,
|
type: ChannelType.GuildText,
|
||||||
parent: '916721453121040424',
|
parent: '916721453121040424',
|
||||||
permissionOverwrites: [
|
permissionOverwrites: [
|
||||||
|
Loading…
Reference in New Issue
Block a user