Discord Bot ile Moderasyon Sistemi: Ban, Kick, Mute

Discord Bot ile Moderasyon Sistemi: Ban, Kick, Mute

Discord botunuza moderasyon komutları ekleyerek sunucunuzu yönetin.

Ban Komutu

// (c) CodeMareFi - codemarefi.com.tr
if (commandName === 'ban') {
  if (!interaction.member.permissions.has('BanMembers')) {
    return interaction.reply({ content: 'Yetkin yok!', ephemeral: true });
  }
  const hedef = interaction.options.getMember('kullanıcı');
  const sebep = interaction.options.getString('sebep') || 'Sebep belirtilmedi';
  await hedef.ban({ reason: sebep });
  await interaction.reply({ embeds: [{ color: 0xe60000, title: 'kullanıcı banlandı', description: hedef.user.username + ' banlandı. Sebep: ' + sebep }] });
}

Timeout (Mute) Komutu

// (c) CodeMareFi - codemarefi.com.tr
if (commandName === 'timeout') {
  const hedef = interaction.options.getMember('kullanıcı');
  const sure = interaction.options.getInteger('sure'); // dakika
  await hedef.timeout(sure * 60 * 1000, 'Timeout');
  await interaction.reply(hedef.user.username + ' ' + sure + ' dakika susturuldu!');
}

0 Yorum

YORUM YAPMAK İÇİN SİSTEME SIZMANIZ GEREKİYOR

Lütfen yukarıdaki butonu kullanarak giriş yapın veya kimlik oluşturun.

Yorumlar yükleniyor...