#Hepl me pls
1 messages · Page 1 of 1 (latest)
Send any one cmd from ur bot
Bro i asked you several times for any of your code from your bot
You keep ignoring
Ok here you go
This is the member count command
/membercount from your bots code
All In One version 1
const {
SlashCommandBuilder,
ContainerBuilder,
TextDisplayBuilder,
SeparatorBuilder,
MessageFlags,
SeparatorSpacingSize,
PermissionFlagBits,
ChannelType,
} = require("discord.js");
module.exports = {
data: new SlashCommandBuilder()
.setName("announcement")
.setDescription("Make an announcement in the server.")
.addStringOption((option) =>
option
.setName("message")
.setDescription("The announcement message")
.setRequired(true)
)
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the announcement to")
.addChannelTypes(ChannelType.GuildText)
.setRequired(false)
)
.setDefaultMemberPermissions(PermissionFlagBits.ManageMessages),
async execute(interaction, client) {
const message = interaction.options.getString("message");
const channel = interaction.options.getChannel("channel") || interaction.channel;
const container = new ContainerBuilder();
container.addTextDisplayComponents(
new TextDisplayBuilder().setContent("## 📢 Announcement")
);
container.addSeparatorComponents(
new SeparatorBuilder().setSpacing(SeparatorSpacingSize.Small)
);
container.addTextDisplayComponents(
new TextDisplayBuilder().setContent(message)
);
await channel.send({
components: [container],
flags: MessageFlags.IsComponentsV2,
});
await interaction.reply({
content: `✅ Announcement sent to ${channel}`,
ephemeral: true,
});
},
};
/*
: ! Aegis !
+ Discord: itsfizys
+ Portfolio: https://itsfiizys.com
+ Community: https://discord.gg/8wfT8SfB5Z (AeroX Development )
+ for any queries reach out Community or DM me.
*/
the slsh comand not showing
It will show after some time
Discord takes time to load slash commands
Bro the code is not working for me also
Depends on your code structure
Ok
What do you mean by code structure
Not for you
But it simply means that how you coded a command
You can make that code by editing the
/create-embed command file
In that command what ever we write as description will comes as he said only change is that he needs a Separator between title and description and next to title user avatar as thumbnail which can be fetched by
interaction.user.displayAvatarURL()
Bro the code is wrong
It is
PermissionFlagsBits
You typed
PermissionFlagBits
🙂
It worked but there is no user avatar and name executing the command
I can add that
That much you can change
Typo happens sometimes
And that doesnt effect the code
As I am not using any permission realted thing here
It will still cause a discord.js error as thats not the correct calling for PermissionFlagsBits it makes it ignore the command
Unless you use CustomClient
It won't work
@hazy lodge
My point stands still
But didn't effect his code right 🙂
@hazy lodge could you add those
In the code above?
Or i'll just add them later
@dreamy iris here's a fixed code and working i personally tested with my bot
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Thx
Yo thnx ❤️