“discord.js v12 à v13” Réponses codées

discord.js v13

const Discord = require("discord.js");
const client = new Discord.Client({
	intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MEMBERS, Discord.Intents.FLAGS.GUILD_BANS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.DIRECT_MESSAGES]
}); // DISCORD.JS V13

client.on("messageCreate", message => {
if(message.content = "!ping") {
	message.channel.send("pong!")
  }
})

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.login('YOUR_TOKEN')
Pudochu

discord.js v12 à v13

const { MessageEmbed } = require("discord.js");

module.exports = {
  conf: {
    aliases: [],
    name: "avatar",
    help: "avatar",
  },

  /**
   * @param { Client } client
   * @param { Message } message
   * @param { Array<String> } args
   */
  
  run: async (client, message, args) => {
    if(message.channel.id == "949757036197982208") return message.channel.send(new MessageEmbed().setDescription(`Bu komutu bu sohbette kullanamazsın!`).setColor("GOLD").setTimestamp().setFooter(`Miaf && Nikkos`))
    const user = args[0] ? message.mentions.users.first() || await client.users.fetch(args[0]) : message.author;
    const gif = user.displayAvatarURL({ dynamic: true }).endsWith(".gif") ? ` | [GIF](${user.displayAvatarURL({ format: "gif" })})` : "";

    const embed = new MessageEmbed()
      .setColor("RANDOM")
      .setTitle(user.username)
      .setDescription(`**[WEBP](${user.displayAvatarURL({ format: "webp", })}) | [JPEG](${user.displayAvatarURL({ format: "jpeg", })}) | [PNG](${user.displayAvatarURL({ format: "png" })}) ${gif}**`)
      .setImage(user.displayAvatarURL({ dynamic: true, size: 2048 }));
    message.channel.send(embed);
  },
};
Adventurous Angelfish

discord.js v12 à v13

                    return message.channel.send(miafEmb.setDescription(`❯ Sunucu tehlike durumu zaten açık.\n❯ Kanal yedekleri kullanılmaya başlandığında otomatik olarak sunucu tehlike moduna alınır!`));

Adventurous Angelfish

discord.js v12 à v13

    message.guild.members.ban(user.id, { reason }).catch(() => {});
Adventurous Angelfish

discord.js v12 à v13

client.on('message', message)
fcwepms

Réponses similaires à “discord.js v12 à v13”

Questions similaires à “discord.js v12 à v13”

Plus de réponses similaires à “discord.js v12 à v13” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code