Code Monkey home page Code Monkey logo

esx_discord_bot's Introduction

Hey 👋, I'm Charly!

Linkedin Badge Twitter Badge Telegram Badge Discord Badge GitHub Updates elnelyo GitHub hits

https://y.at/💻🦅🌵💎

Talking about Personal Stuffs:

  • 🛠   I’m currently working with Symfony, Tailwind, ReactJS, Javascript
  • 🚀   I’m currently launching my own App about NFT.
  • 👨🏻‍💻   Most of my projects are available on Github.
  • 💬   Ask me about anything here! I am happy to help.
  • 📫   How to reach me: [email protected].
  • 📝   Checkout my Resume.

My Absolute Favorites:

  • 💻   Cryptocurrencies & BlockChain. (0x65AfD1bEaD7Bf5b1289Cf0862b8d8854fA61faBc ETH & BSC )
  • 🤖   Flying Drone
  • 🌆   Travelling around the world

Some Stats

No activity tracked
GitHub Stats

spotify-github-profile

esx_discord_bot's People

Contributors

cr4zzybipbiip avatar elnelyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esx_discord_bot's Issues

Possible to get phone text alert?

Hi

Is it possible to add a feature where you can get all the text messages from esx_phone in the discord as well? :)

Your Sincerely
Mathias Johnsen

anyone help to show in discord /twt?

i want to show /twt command from esx_rpchat with discordbot...

i tryied the pull request, but no working, its showing commands but not /twt...

No log for drop/pickup weapon , dirtymoney .

i install it and follow all steps everythings work except log for drop/pickup items , weapons , dirtymoney .... etc
this is esx_extended

RegisterServerEvent('esx:giveInventoryItem')
AddEventHandler('esx:giveInventoryItem', function(target, type, itemName, itemCount)
local _source = source

local sourceXPlayer = ESX.GetPlayerFromId(_source)
local targetXPlayer = ESX.GetPlayerFromId(target)

if type == 'item_standard' then

	local sourceItem = sourceXPlayer.getInventoryItem(itemName)
	local targetItem = targetXPlayer.getInventoryItem(itemName)

	if itemCount > 0 and sourceItem.count >= itemCount then

		if targetItem.limit ~= -1 and (targetItem.count + itemCount) > targetItem.limit then
			TriggerClientEvent('esx:showNotification', _source, _U('ex_inv_lim', targetXPlayer.name))
		else
			sourceXPlayer.removeInventoryItem(itemName, itemCount)
			targetXPlayer.addInventoryItem   (itemName, itemCount)
			
			TriggerClientEvent('esx:showNotification', _source, _U('gave_item', itemCount, ESX.Items[itemName].label, targetXPlayer.name))
			TriggerClientEvent('esx:showNotification', target,  _U('received_item', itemCount, ESX.Items[itemName].label, sourceXPlayer.name))
			
				TriggerEvent("esx:giveitemalert",sourceXPlayer.name,targetXPlayer.name,ESX.Items[itemName].label,itemCount)

		end

	else
		TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_quantity'))
	end

elseif type == 'item_money' then

	if itemCount > 0 and sourceXPlayer.getMoney() >= itemCount then
		sourceXPlayer.removeMoney(itemCount)
		targetXPlayer.addMoney   (itemCount)

		TriggerClientEvent('esx:showNotification', _source, _U('gave_money', ESX.Math.GroupDigits(itemCount), targetXPlayer.name))
		TriggerClientEvent('esx:showNotification', target,  _U('received_money', ESX.Math.GroupDigits(itemCount), sourceXPlayer.name))
			TriggerEvent("esx:givemoneyalert",sourceXPlayer.name,targetXPlayer.name,itemCount)

	else
		TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
	end

elseif type == 'item_account' then

	if itemCount > 0 and sourceXPlayer.getAccount(itemName).money >= itemCount then
		sourceXPlayer.removeAccountMoney(itemName, itemCount)
		targetXPlayer.addAccountMoney   (itemName, itemCount)

		TriggerClientEvent('esx:showNotification', _source, _U('gave_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], targetXPlayer.name))
		TriggerClientEvent('esx:showNotification', target,  _U('received_account_money', ESX.Math.GroupDigits(itemCount), Config.AccountLabels[itemName], sourceXPlayer.name))
			TriggerEvent("esx:givemoneybankalert",sourceXPlayer.name,targetXPlayer.name,itemCount)

	else
		TriggerClientEvent('esx:showNotification', _source, _U('imp_invalid_amount'))
	end

elseif type == 'item_weapon' then

	if not targetXPlayer.hasWeapon(itemName) then
		sourceXPlayer.removeWeapon(itemName)
		targetXPlayer.addWeapon(itemName, itemCount)

		local weaponLabel = ESX.GetWeaponLabel(itemName)

		if itemCount > 0 then
			TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon_ammo', weaponLabel, itemCount, targetXPlayer.name))
			TriggerClientEvent('esx:showNotification', target,  _U('received_weapon_ammo', weaponLabel, itemCount, sourceXPlayer.name))
			TriggerEvent("esx:giveweaponalert",sourceXPlayer.name,targetXPlayer.name,weaponLabel)
		else
			TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon', weaponLabel, targetXPlayer.name))
			TriggerClientEvent('esx:showNotification', target,  _U('received_weapon', weaponLabel, sourceXPlayer.name))
		end
	else
		TriggerClientEvent('esx:showNotification', _source, _U('gave_weapon_hasalready', targetXPlayer.name, weaponLabel))
		TriggerClientEvent('esx:showNotification', _source, _U('received_weapon_hasalready', sourceXPlayer.name, weaponLabel))
	end

end

end)

this is esx_socity

RegisterServerEvent('esx_society:washMoney')
AddEventHandler('esx_society:washMoney', function(society, amount)
local xPlayer = ESX.GetPlayerFromId(source)
local account = xPlayer.getAccount('black_money')
amount = ESX.Math.Round(tonumber(amount))

if xPlayer.job.name == society then
	if amount and amount > 0 and account.money >= amount then
		xPlayer.removeAccountMoney('black_money', amount)

		MySQL.Async.execute('INSERT INTO society_moneywash (identifier, society, amount) VALUES (@identifier, @society, @amount)', {
			['@identifier'] = xPlayer.identifier,
			['@society']    = society,
			['@amount']     = amount
		}, function(rowsChanged)
			TriggerClientEvent('esx:showNotification', _source, _U('you_have', ESX.Math.GroupDigits(amount)))
			TriggerEvent("esx:washingmoneyalert",xPlayer.name,amount)

		end)
	else
		TriggerClientEvent('esx:showNotification', _source, _U('invalid_amount'))
	end
else
	print(('esx_society: %s attempted to call washMoney!'):format(xPlayer.identifier))
end

end)

Not an issue but a question.

Am I able to go about adding something that will notify me if people use a .lua injector to spawn money? I'm having a big issue with this and its a hassle to monitor the database all day when I have stuff going on.

Not sending any menasges

SCRIPT ERROR: @esx_discord_bot/server/main.lua:140: attempt to index a nil value (local 'xPlayerKiller')

nil value

esx_discord_bot/client/main.lua:108: attempt to index a nil value (global 'settings')

attempt to index a nil value (local ‘xPlayerKiller’)

Hello , i need help in this script , cant see deaths log .

### SCRIPT ERROR: @esx_discord_bot/server/main.lua:282: attempt to index a nil value (local ‘xPlayerKiller’)

ERROR LINE local xPlayerKiller = ESX.GetPlayerFromId(killer)

AddEventHandler('esx:killerlog', function(t,killer, kilerT) -- t : 0 = NPC, 1 = player
  local xPlayer = ESX.GetPlayerFromId(source)
  if(t == 1) then
     local xPlayer = ESX.GetPlayerFromId(source)
     local xPlayerKiller = ESX.GetPlayerFromId(killer)

     if(xPlayerKiller.name ~= nil and xPlayer.name ~= nil)then

       if(kilerT.killerinveh) then
         local model = kilerT.killervehname

            sendToDiscord(_U('server_kill'), xPlayer.name .." ".._('user_kill').." "..xPlayerKiller.name.." ".._('with').." "..model,Config.red)



       else
            sendToDiscord(_U('server_kill'), xPlayer.name .." ".._('user_kill').." "..xPlayerKiller.name,Config.red)



       end
    end
  else
     sendToDiscord(_U('server_kill'), xPlayer.name .." ".. _('user_kill_environnement'),Config.red)
  end

end)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.