Discord bot example komutu

I Am Bunny.exe

Decapat
Katılım
30 Ağustos 2021
Mesajlar
512
Çözümler
4
Daha fazla  
Cinsiyet
Erkek
Meslek
Küçük kodlama işlemleri ve editörlük.
Arkadaşlar, bana Discord bot icin example komutu gerekli ve bulamiyorum.
 
Son düzenleyen: Moderatör:
JavaScript:
import { Client, GatewayIntentBits } from "discord.js";

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
});
client.login(TOKEN);

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

client.on("messageCreate", async (msg) => {
  if (msg.content === "!ping") {
    msg.reply(`Gecikme süresi ${Date.now() - msg.createdTimestamp}ms`);
  }
});
 
JavaScript:
import { Client, GatewayIntentBits } from "discord.js";

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
});
client.login(process.env.TOKEN);

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

client.on("messageCreate", async (msg) => {
  if (msg.content === "!ping") {
    msg.reply(`Gecikme süresi ${Date.now() - msg.createdTimestamp}ms`);
  }
});
Python kullanmiyorum.
 
JavaScript:
import { Client, GatewayIntentBits } from "discord.js";

const client = new Client({
 intents: [
 GatewayIntentBits.Guilds,
 GatewayIntentBits.GuildMessages,
 GatewayIntentBits.MessageContent,
 ],
});
client.login(TOKEN);

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

client.on("messageCreate", async (msg) => {
 if (msg.content === "!ping") {
 msg.reply(`Gecikme süresi ${Date.now() - msg.createdTimestamp}ms`);
 }
});

V 12 icin kodunuz var mı hocam?
 

Geri
Yukarı