Discourse Bot Lib. The Bot lib for discourse. Made with python

Discourse Bot Lib. The Bot lib for discourse. Made with python

Hi I made a bot lib for Discourse a few days ago, and I’m posting it here to publish it to the wider community.

It is made with python3.9. but should work with 3.8

What is a bot lib

A bot lib is some code that allows you to connect to a server that you can chat on, play games on, etc. It allows you to control an account that you have access to

Here is a working example of a bot (on another discourse forum)

Url:

2 Likes

Did not see other Category`s sry

Hi! For those who aren’t versed in savvy stuff, can you explain (briefly, think “Explain Me Like I’m Five” :smile:) what is the purpose of this “bot lib”?
I tried to have a glimpse by searching “python bot lib” on the Internet but the results are quite technical.

My understanding is that this is a script that allows bots to post on Discourse through a single, dedicated Discourse account?

2 Likes

Hi! For those who aren’t versed in savvy stuff, can you explain (briefly, think “Explain Me Like I’m Five” :smile:) what is the purpose of this “bot lib”?

il update it

My understanding is that this is a script that allows bots to post on Discourse through a single, dedicated Discourse account?

and yes this is fully right

It’s a library for the Python programming language that allows users to make bots for Discourse.

1 Like

I just updated it arrow lmao

Interesting.

A few questions!

Have you a few examples of practical, real-life purposes?

How would you manage the limit rates?

I had a custom WordPress plugin that allowed WP users to post on Discourse through a single Discourse account (WP comment → Discourse reply). It was barely used, but the post rate limit and the maximum consecutive messages among other things had to be thought about.

So, how do you circumvent these potential issues?
Could you maybe create new Discourse accounts on the fly? :thinking: :man_shrugging:

  1. test bot ground - #1265 by Bridge - Bot Development - Meower Forums (uses a slightly modified version to be more real time, getting posts every 2 seconds)

  2. I only get posts every 4 seconds

  3. Generally all you need to do is give the user more perms, as its the programmers choice on when they send a message

  4. no i could not. This uses the discourse API.
    it is completely separate from the hosting server and uses user API keys that by default can only be generated by an admin user without a plugin

1 Like

Hey there!

Is there any documentation for this library? If so, where could I find it?

I could write some for it!

Another great place for it is just normal discourse API docs, bc it takes directly from that

Oh I didn’t realize those were a thing–I’ll look into that, too.

Uh yeah i basically forgot about it, my use for it is fully gone so

1 Like