I decide to stop working on this prototype of GamerX "DiscordPySAMP" echo bot. If you previously saw RoBOT_Test bot that appears online in #samp-echo channel before, this is how it was made. Started working on this around July until October. I am not that advanced on Python nor C/C++. So I am sharing this code to Admins (not public) who are interested to continue it or just for personal use/learning.
Original idea thanks to Jovan however he could not help continue developing it when I asked.
There is problem when a message was sent frequently in the channel, the bot stops working from sending echo messages unexpectedly, and causes heap underflow error in the pawn plugin. Probably due to race condition/memory leak that I have not able to identify yet (i tried using mutex, still same).
Using discord.py with Python 3.5.4+ on Windows (Tested with Python 3.6 on linux) as base bot script, and this C/C++ AMX plugin to embed the python interpreter to the server.
Everything else explained in README.txt file
Password for the zip file is:
Binary (.dll/.so) not included.
EDIT: Yes I do know there is a pure C++ implementation of Discord API for SA-MP https://github.com/maddinat0r/samp-discord-connector However it is unstable (unexpected/random server crash issues), Rick previously tried to implement it in GamerX v4.5 but then removed.
EDIT2: It is now available as open source to public, i will pass the authority to denNorske to maintain it
Original idea thanks to Jovan however he could not help continue developing it when I asked.
There is problem when a message was sent frequently in the channel, the bot stops working from sending echo messages unexpectedly, and causes heap underflow error in the pawn plugin. Probably due to race condition/memory leak that I have not able to identify yet (i tried using mutex, still same).
Using discord.py with Python 3.5.4+ on Windows (Tested with Python 3.6 on linux) as base bot script, and this C/C++ AMX plugin to embed the python interpreter to the server.
Everything else explained in README.txt file
Password for the zip file is:
Code:
gxdiscordpysamp
EDIT: Yes I do know there is a pure C++ implementation of Discord API for SA-MP https://github.com/maddinat0r/samp-discord-connector However it is unstable (unexpected/random server crash issues), Rick previously tried to implement it in GamerX v4.5 but then removed.
EDIT2: It is now available as open source to public, i will pass the authority to denNorske to maintain it