“Discord.js v12 do v13” Kod odpowiedzi

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 do 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 do 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 do v13

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

Discord.js v12 do v13

client.on('message', message)
fcwepms

Odpowiedzi podobne do “Discord.js v12 do v13”

Pytania podobne do “Discord.js v12 do v13”

Więcej pokrewnych odpowiedzi na “Discord.js v12 do v13” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu