Facebook
From Corrupt Agouti, 3 Years ago, written in JavaScript.
">

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

from

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

- view diff
Embed
Download Paste or View Raw
Hits: 49
  1. const Discord = require('discord.js')
  2. const data = require('quick.db')
  3.  
  4. exports.run = async (client, message, args) => {
  5. let prefix = ''// botun prefixi
  6.  
  7.  if(!message.member.roles.get("802901038700691456") && !message.member.hasPermission('ADMINISTRATOR')) return message.channel.send('Yetkin Yeterli Değil')
  8. if(!args[0]) return message.channel.send(`Sistemi kullanmak için, ${prefix}uyarı ekle/sil/bilgi komutlarını kullanın.`)
  9.  
  10.  
  11. if(args[0] === 'ekle') {
  12. let kullanıcı = message.mentions.users.first()
  13. if(!args[1]) return message.channel.send(`Bir kişiyi etiketlemelisin.`)
  14. if(!kullanıcı) return message.channel.send(`${args[1]}, kullanıcısını sunucuda bulamıyorum.`)
  15. if(kullanıcı.bot) return message.channel.send(`Botları uyaramam.`)
  16. if(kullanıcı.id === message.author.id) return message.channel.send(`Kendini uyaramazsın.`)
  17. let reason = args.slice(2).join(' ')
  18.  
  19. data.add(`uyarı.${message.guild.id}.${kullanıcı.id}`, +1)
  20. const syı = await data.fetch(`uyarı.${message.guild.id}.${kullanıcı.id}`)
  21.  
  22. if(!reason) {
  23. await message.channel.send(`${kullanıcı}, uyarıldı!\nToplam uyarı sayısı: ${syı}`)
  24. await kullanıcı.send(`${kullanıcı}, merhaba! ${message.guild.name} sunucusunda sebepsiz bir şekilde uyarıldın. Dikkatli ol!`)
  25. return}
  26.  
  27. if(reason) {
  28. await message.channel.send(`${kullanıcı}, uyarıldı!\nToplam uyarı sayısı: ${syı}`)
  29. await kullanıcı.send(`${kullanıcı}, merhaba! ${message.guild.name} sunucusunda ${reason} sebebiyle uyarıldın. Dikkatli ol!`)
  30. return} }
  31.  
  32. if(args[0] === 'sil') {
  33. let kullanıcı = message.mentions.users.first()
  34. if(!args[1]) return message.channel.send(`Bir kişiyi etiketlemelisin.`)
  35. if(!kullanıcı) return message.channel.send(`${args[1]}, kullanıcısını sunucuda bulamıyorum.`)
  36. if(kullanıcı.id === message.author.id) return message.channel.send(`Kendini uyaramazsın.`)
  37.  
  38. let sayı = args[2]
  39. if(!sayı) return message.channel.send(`Silinecek uyarı sayısını yazmadın!`)
  40. if(isNaN(sayı)) return message.channel.send(`Silinecek uyarı sayısını yazmadın!`)
  41. if(sayı === '0') return message.channel.send(`Beni mi kandırmaya çalışıyorsun sen?`)
  42. const syı2 = await data.fetch(`uyarı.${message.guild.id}.${kullanıcı.id}`)
  43. if(syı2 < sayı) return message.channel.send(`${kullanıcı}, kullanıcısının uyarı sayısı: ${syı2}! Sadece bu kadar silebilirsin.`)
  44.  
  45. data.add(`uyarı.${message.guild.id}.${kullanıcı.id}`, -sayı)
  46. const syı = await data.fetch(`uyarı.${message.guild.id}.${kullanıcı.id}`)
  47. await message.channel.send(`${kullanıcı}, uyarısı silindi!\nToplam uyarı sayısı: ${syı ? syı : '0'}`)
  48. await kullanıcı.send(`${kullanıcı}, merhaba! ${message.guild.name} sunucusunda uyarın silindi. Daha dikkatli ol!`) }
  49.  
  50. if(args[0] === 'bilgi') {
  51. let kullanıcı = message.mentions.users.first()
  52. if(!args[1]) return message.channel.send(`Bir kişiyi etiketlemelisin.`)
  53. if(!kullanıcı) return message.channel.send(`${args[1]}, kullanıcısını sunucuda bulamıyorum.`)
  54.  
  55. const syı2 = await data.fetch(`uyarı.${message.guild.id}.${kullanıcı.id}`)
  56. if(!syı2) return message.channel.send(`${kullanıcı}, kullanıcısının hiç uyarısı yok.`)
  57. await message.channel.send(`${kullanıcı}:\nToplam uyarı sayısı: ${syı2 ? syı2 : '0'}`) }
  58. };
  59.  
  60. exports.conf = {
  61. enabled: true,
  62. guildOnly: false,
  63. aliases: ['warn'],
  64. permLevel: 0,
  65. }
  66.  
  67. exports.help = {
  68. name: 'uyarı'
  69. }
  70.  
  71. //Coded By ArtıkYok