• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OpenTibia Python Tibia<->Discord bot

Infernum

Senator
Joined
Feb 14, 2015
Messages
5,631
Solutions
559
Reaction score
3,846
Self-hosted Discord bot to communicate to and from your server. Automatically inserts tables needed to database on first-time setup.

Git repo: delusionx/Serpent (https://github.com/delusionx/Serpent/)

Pre-implemented commands: online, uptime
Command prefix: ;
Example on how to add a new command: Add uptime command · delusionx/[email protected] (https://github.com/delusionx/Serpent/commit/2187339f29c25b27549380a3d9aa5d0d991fe086)
Example on sending data from server to the bot with a custom event: Player death event · delusionx/[email protected] (https://github.com/delusionx/Serpent/commit/02825d54d26e520a3c8c2aa41b23bdf01ea9ff4b)

If you want to send data from your server to the bot, use the enqueue(command, args) function anywhere in a Lua file, add it to event_listener.py in self.commands and handle with either a custom callback or the default command_finish callback. Keep in mind this is a work-in-progress and a barebones project, let me know if anything is broken by submitting an issue on Github.

If you'd like to see it in action, join my testing server: Join the Serpent Discord Server! (https://discord.gg/NqPmGDz)
 
Last edited:

Ochman

Advanced OT User
Joined
Feb 27, 2016
Messages
339
Solutions
5
Reaction score
238
Hello Delusion,
Nice contribution. Do you think we (community) can make an use of this bot, making it OTLand bot? (Something like The Forgotted Server Discord)?
If so, please reformat code with PEP8 standards, so it'll be easier to contribute.
 
OP
OP
Infernum

Infernum

Senator
Joined
Feb 14, 2015
Messages
5,631
Solutions
559
Reaction score
3,846
Hello Delusion,
Nice contribution. Do you think we (community) can make an use of this bot, making it OTLand bot? (Something like The Forgotted Server Discord)?
If so, please reformat code with PEP8 standards, so it'll be easier to contribute.
It's intended for private use in OT Discord servers, not a public general-use bot.
 

Ochman

Advanced OT User
Joined
Feb 27, 2016
Messages
339
Solutions
5
Reaction score
238
I assumed so, but maybe we could create a "bot template" that anyone could fork if they're willing to?
Just like TFS, people copy it and then work on it separately.


I personally could contribute to it adding functionalities, but to do so, we should standarize our code with PEP8 standards.
It depends on the intended purpose of this source code. If you'd like to share with whatever you made for yourself - it's okay. But I am saying that we could potentially develop something bigger; and for this we'll need to stick to suggestions made by Python Style Guide.
 
OP
OP
Infernum

Infernum

Senator
Joined
Feb 14, 2015
Messages
5,631
Solutions
559
Reaction score
3,846
I assumed so, but maybe we could create a "bot template" that anyone could fork if they're willing to?
Just like TFS, people copy it and then work on it separately.


I personally could contribute to it adding functionalities, but to do so, we should standarize our code with PEP8 standards.
It depends on the intended purpose of this source code. If you'd like to share with whatever you made for yourself - it's okay. But I am saying that we could potentially develop something bigger; and for this we'll need to stick to suggestions made by Python Style Guide.
Some of this is old code, some of this I rewrote quickly (The entire repo is only a few days old). I wanted to create something that I can continuously work on as a means to learn git and try to get used to it. I'll start formatting to PEP8 standards so others can contribute.
Edit: finished
 
Last edited:

Ochman

Advanced OT User
Joined
Feb 27, 2016
Messages
339
Solutions
5
Reaction score
238
I could possible do refactor tomorrow, but have you made some changes already?
I assume I'd touch most of the files, so even tho it's repository, it might be messy to merge those changes later on
 

miguelshta

Member
Joined
Mar 21, 2009
Messages
299
Solutions
1
Reaction score
10
Location
Toronto, Canada
i've done all steps and the bot goes online but no response from commands here is my path of the start.py "C:\OT1\Serpent"
 
Top