Discord WebHook Bot

Approved Discord WebHook Bot 1.0.1

No permission to download

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
3,983
1,467
113
At your house.
github.com
Overall code seems fine, and safe. Approved.

I suggest to use threading when doing web requests, because It will hold down the main thread, and will cause the server to lagg sometimes.
(I know, the wiki is down.)

Python:
Loom.ExecuteInBiggerStackThread(lambda:
    WebHook.execute()
)
 
  • Like
Reactions: SPooCK

SPooCK

Plugin Developer
Plugin Developer
Jul 27, 2014
14
19
3
26
England / Bulgarian
Overall code seems fine, and safe. Approved.

I suggest to use threading when doing web requests, because It will hold down the main thread, and will cause the server to lagg sometimes.
(I know, the wiki is down.)

Python:
Loom.ExecuteInBiggerStackThread(lambda:
    WebHook.execute()
)
Noted. Just warming up to the old Legacy development. :p I would have preferred doing it in C#, but since its not yet supported for dynamic reloading, a small plugin like this, I would think it's better left in Python for now.
 
  • Like
Reactions: DreTaX

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
3,983
1,467
113
At your house.
github.com
You actually put the handling in a sub thread ^^
The Fougerite system now shows if something takes very long to call.

The page just explains that there are functions that must be called on the main thread.
 

SPooCK

Plugin Developer
Plugin Developer
Jul 27, 2014
14
19
3
26
England / Bulgarian
You actually put the handling in a sub thread ^^
The Fougerite system now shows if something takes very long to call.

The page just explains that there are functions that must be called on the main thread.
Well, as long its put in the right place, I'm happy enough. Too much of a headache knowing the right methodology, main thread, sub thread... :rolleyes: