Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Doubt isn't the opposite of faith; it is an element of faith. -- Paul Tillich, German theologian.


dovenet / Synchronet Javascript / Discord webhook integration

SubjectAuthor
* Discord webook integrationHunter-Z
+* Re: Discord webook integrationTracker1
|`- Re: Discord webook integrationMRO
+* Discord webhook integrationHunter-Z
|`* Discord webhook integrationMRO
| `* Discord webhook integrationHunter-Z
|  `- Discord webhook integrationMRO
+- Discord webook integrationDigital Man
`- Discord webook integrationDaiTengu

1
Discord webook integration

<6174C482.3500.sync-js@vert.synchro.net>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=605&group=DOVE-Net.Synchronet_Javascript#605

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: hunter-z@VERT (Hunter-Z)
To: All
Subject: Discord webook integration
Message-ID: <6174C482.3500.sync-js@vert.synchro.net>
Date: Sat, 23 Oct 2021 12:27:14 -0700
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.19a-Win32 master/0e270c4ea4 Oct 5 2021 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20211023192714-0700 c1e0
WhenExported: 20211024115738-0700 c1e0
ExportedFrom: VERT sync-js 3500
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Hunter-Z - Sat, 23 Oct 2021 19:27 UTC

Hello. I used to run a Synchronet BBS in the mid-late 1990s, and set up a
modern version in a WinXP VirtualBox VM in 2015 for fun. I recently blew the dust off of this because some friends on Discord were interested in
experiencing the BBS thing in a private setting.

Since we're using Discord and Synchronet is now heavy into JavaScript, I
thought I'd try hooking the two together. I've had limited success using an HTTPRequest from Synchronet's http.js to send POST requests to a Discord
webhook URL, but I've run into some issues and limitations that I could use
some advice on.

I should mention up-front that I'm a novice at JavaScript, so I'm probably
going about this all wrong. My native language is C++!
+--------------------------+
|Logon/logoff notifications|
+--------------------------+
The first thing I tried to do was have Synchronet tell people on Discord when someone logs on or off. Logon works great, even reporting the user and node number. Logoff, on the other hand, is problematic: It seems that regardless of whether I use the fixed event or an on-logoff event-driven external program entry, Synchronet terminates my JavaScript code before it can send the POST request! As an ugly hack, I was able to get it working by having a fixed logoff event call a .BAT file, which in turn calls jsexec -x, but there has to be a better way?

I'm also wondering if this is the best way to do any of this in general. What about just creating custom logon/logoff *modules* that wrap the default ones or something? Any suggestions?

+-------------------------+
|BBS up/down notifications|
+-------------------------+
I'd love to have something notify Discord when the BBS goes up or down, but there isn't an obvious way to do this either. I was able to get a "BBS up" notification to work by creating a timed even that is set to run on *no* days
of the week, and to run on (re)init, but this again feels like a hack.

I also don't see any way at all to trigger a "BBS down" event. I'm wondering if maybe I should just handle this externally to Synchronet, like maybe via a Windows Task Manager job or something?

+------------------------------+
|External Program notifications|
+------------------------------+
Edit: Forgot to mention this. It would be great if I could somehow trigger a script when someone enters a door program, without having to edit every door's configuration to integrate it via a batch file or whatever.

Any advice/thoughts appreciated.

Thanks,
- Ben S. / HunterZ

---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Re: Discord webook integration

<61755966.547.dove-syncjs@roughneckbbs.com>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=606&group=DOVE-Net.Synchronet_Javascript#606

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: tracker1@VERT/TRN (Tracker1)
To: Hunter-Z
Subject: Re: Discord webook integration
Message-ID: <61755966.547.dove-syncjs@roughneckbbs.com>
Date: Sat, 23 Oct 2021 23:02:29 -0700
X-Comment-To: Hunter-Z
Path: rocksolidbbs.com!not-for-mail
Organization: Roughneck BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6174C482.3500.sync-js@vert.synchro.net>
References: <6174C482.3500.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19a-Linux HEAD/15906e1 Sep 21 2021 GCC 6.3.0
X-FTN-CHRS: UTF-8 4
WhenImported: 20211024064521-0700 c1e0
WhenExported: 20211024115738-0700 c1e0
ExportedFrom: VERT sync-js 3501
WhenImported: 20211024130230Z 0000
WhenExported: 20211024134314Z 0000
ExportedFrom: TRN dove-syncjs 547
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)Gecko/20100101 Thunderbird/91.2.1
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
 by: Tracker1 - Sun, 24 Oct 2021 06:02 UTC

On 10/23/21 7:27 PM, Hunter-Z wrote:
> +-------------------------+
> |BBS up/down notifications|
> +-------------------------+
> I also don't see any way at all to trigger a "BBS down" event.
> I'm wondering if maybe I should just handle this externally to
> Synchronet, like maybe via a Windows Task Manager job or something?

Down notifications are best done from another system... You can have
that system poll every N minutes to see if you're up, and send a down
notification if it fails... more complexity could be to check every 5
mninutes, then check again every 30s and 5 fails in a row, fire teh
notification.

> +------------------------------+
> |External Program notifications|
> +------------------------------+
> Edit: Forgot to mention this. It would be great if I could somehow
> trigger a script when someone enters a door program, without having to
> edit every door's configuration to integrate it via a batch file or
> whatever.

Edit your command shell to use the xtrn_sec.js module for doors, then
modify that module.... that would probably be the easiest path... I
think that is the name of it, it may just be xtrn.js ... I don't recall
if there's another even that triggers before every door.
--
Michael J. Ryan - tracker1@roughneckbbs.com
---
� Synchronet � Roughneck BBS - roughneckbbs.com

Discord webhook integration

<617582EB.3502.sync-js@vert.synchro.net>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=607&group=DOVE-Net.Synchronet_Javascript#607

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: hunter-z@VERT (Hunter-Z)
To: All
Subject: Discord webhook integration
Message-ID: <617582EB.3502.sync-js@vert.synchro.net>
Date: Sun, 24 Oct 2021 01:59:39 -0700
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6174C482.3500.sync-js@vert.synchro.net>
References: <6174C482.3500.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19a-Win32 master/4d0181837 Aug 17 2021 MSC 1922
X-FTN-CHRS: CP437 2
WhenImported: 20211024085939-0700 c1e0
WhenExported: 20211024115738-0700 c1e0
ExportedFrom: VERT sync-js 3502
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Hunter-Z - Sun, 24 Oct 2021 08:59 UTC

Re: Discord webook integration
By: Hunter-Z to All on Sat Oct 23 2021 07:27 pm

(oops, typo in subject that I can't seem to edit - meant to say "webhook")

Update: Got everything working that I wanted to do, via a plethora of different hacks. Below is info on the additional pieces I implemented since my initial post.

BBS down:

I found a tool called something like Bill2's Process Monitor that can monitor processes and take various actions. I configured this to run a "BBS down" notification script when Synchronet's process goes away.

This works great, except it doesn't seem to fire fast enough when the whole VM is shutting down / rebooting, so I also added a call to the notification script as a shutdown entry in WinXP's group policy editor.

External program run:

Turns out that Synchronet's modopts.ini allows you to define optional script hooks for when a user enters and exits an external program. This is great, and I wish there were either more of these, or more event triggers in the config utility (it's weird that both solutions coexist, but better than having no options at all!).

I wasn't able to make heads or tails of the wiki documentation on js.exec() regarding passing of parameters (which is how I tell my webhook script what to post to Discord), but I found an example of doing it via load() that works fine.

Summary:

In the end, it feels pretty hacky that I'm using no less than 5 different ways to trigger events (fixed events in SBBS config, "timed" even in SBBS config, modopts.ini script hooks, external process monitor, Windows group policy). It would be ideal for Synchronet to provide a unified means to implement triggers for all of these cases, but it is what it is, and at least I accomplished my goals!

- Ben S. / HunterZ

---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Re: Discord webook integration

<61757DE3.3053.sync_js@bbses.info>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=608&group=DOVE-Net.Synchronet_Javascript#608

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: mro@VERT/BBSESINF (MRO)
To: all
Subject: Re: Discord webook integration
Message-ID: <61757DE3.3053.sync_js@bbses.info>
Date: Sun, 24 Oct 2021 03:38:11 -0500
X-Comment-To: all
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61755966.547.dove-syncjs@roughneckbbs.com>
References: <61755966.547.dove-syncjs@roughneckbbs.com>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20211024085956-0700 c1e0
WhenExported: 20211024115738-0700 c1e0
ExportedFrom: VERT sync-js 3503
WhenImported: 20211024103811-0500 c168
WhenExported: 20211024105952-0500 c168
ExportedFrom: BBSESINF sync_js 3053
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Sun, 24 Oct 2021 08:38 UTC

Re: Re: Discord webook integration
By: Tracker1 to Hunter-Z on Sun Oct 24 2021 06:02 am

> On 10/23/21 7:27 PM, Hunter-Z wrote:
> > +-------------------------+
> > |BBS up/down notifications|
> > +-------------------------+
> > I also don't see any way at all to trigger a "BBS down" event.
> > I'm wondering if maybe I should just handle this externally to
> > Synchronet, like maybe via a Windows Task Manager job or something?
>
> Down notifications are best done from another system... You can have
> that system poll every N minutes to see if you're up, and send a down
> notification if it fails... more complexity could be to check every 5
> mninutes, then check again every 30s and 5 fails in a row, fire teh
> notification.
>
>
> > +------------------------------+
> > |External Program notifications|
> > +------------------------------+
> > Edit: Forgot to mention this. It would be great if I could somehow
> > trigger a script when someone enters a door program, without having to
> > edit every door's configuration to integrate it via a batch file or
> > whatever.
>
> Edit your command shell to use the xtrn_sec.js module for doors, then
> modify that module.... that would probably be the easiest path... I
> think that is the name of it, it may just be xtrn.js ... I don't recall
> if there's another even that triggers before every door.
> --
> Michael J. Ryan - tracker1@roughneckbbs.com

siteuptime.com is something i've used for MANY years and it's pretty accurate.
it checks your service and if it's down you know.
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

Discord webhook integration

<61758592.3055.sync_js@bbses.info>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=609&group=DOVE-Net.Synchronet_Javascript#609

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: mro@VERT/BBSESINF (MRO)
To: Hunter-Z
Subject: Discord webhook integration
Message-ID: <61758592.3055.sync_js@bbses.info>
Date: Sun, 24 Oct 2021 04:10:58 -0500
X-Comment-To: Hunter-Z
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <617582EB.3502.sync-js@vert.synchro.net>
References: <617582EB.3502.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20211024102957-0700 c1e0
WhenExported: 20211024115738-0700 c1e0
ExportedFrom: VERT sync-js 3504
WhenImported: 20211024111058-0500 c168
WhenExported: 20211024112952-0500 c168
ExportedFrom: BBSESINF sync_js 3055
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Sun, 24 Oct 2021 09:10 UTC

Re: Discord webhook integration
By: Hunter-Z to All on Sun Oct 24 2021 08:59 am

> Update: Got everything working that I wanted to do, via a plethora of
> different hacks. Below is info on the additional pieces I implemented since
> my initial post.
>
> BBS down:

your bbs probably won't go down.
i would suggest making the computer reboot once a day, though.

> policy). It would be ideal for Synchronet to provide a unified means to
> implement triggers for all of these cases, but it is what it is, and at
> least I accomplished my goals!

I don't know if other people need this, but you can request it. or do it yourself with scripting.
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

Discord webhook integration

<6175A284.3505.sync-js@vert.synchro.net>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=610&group=DOVE-Net.Synchronet_Javascript#610

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: hunter-z@VERT (Hunter-Z)
To: MRO
Subject: Discord webhook integration
Message-ID: <6175A284.3505.sync-js@vert.synchro.net>
Date: Sun, 24 Oct 2021 04:14:28 -0700
X-Comment-To: MRO
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61758592.3055.sync_js@bbses.info>
References: <61758592.3055.sync_js@bbses.info>
X-FTN-PID: Synchronet 3.19a-Win32 master/4d0181837 Aug 17 2021 MSC 1922
X-FTN-CHRS: CP437 2
WhenImported: 20211024111428-0700 c1e0
WhenExported: 20211024115738-0700 c1e0
ExportedFrom: VERT sync-js 3505
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Hunter-Z - Sun, 24 Oct 2021 11:14 UTC

Re: Discord webhook integration
By: MRO to Hunter-Z on Sun Oct 24 2021 11:10 am

> your bbs probably won't go down.
> i would suggest making the computer reboot once a day, though.

It won't go down due to failure, but I've been cycling/downing it a lot to make changes, add things, etc. It's also running in a VM on my HTPC, so it's possible that I will need to occasionally reboot the host or temporarily stop the VM for various other reasons (maintenance etc.).

> I don't know if other people need this, but you can request it. or do it
> yourself with scripting.

Is this something that would be worth writing a Git issue on, or would it just waste everyone's time?

My final thoughts are:
- It would be nice to have a canonical/supported way to script an action when Synchronet shuts down.
- It would be nice to see some design consolidation of scripting triggers, as having to dig through module selections, fixed events, on-init-via-timed-menu events, event-triggered external programs, modopts.ini script hooks, etc. to find the best way to do something makes for a steep learning curve - especially when the answer is different depending on what you're trying to accomplish.

Thanks,
- Ben S. / HunterZ

---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Discord webhook integration

<6175A78D.3057.sync_js@bbses.info>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=611&group=DOVE-Net.Synchronet_Javascript#611

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: mro@VERT/BBSESINF (MRO)
To: Hunter-Z
Subject: Discord webhook integration
Message-ID: <6175A78D.3057.sync_js@bbses.info>
Date: Sun, 24 Oct 2021 06:35:57 -0500
X-Comment-To: Hunter-Z
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6175A284.3505.sync-js@vert.synchro.net>
References: <6175A284.3505.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20211024115958-0700 c1e0
WhenExported: 20211024175749-0700 c1e0
ExportedFrom: VERT sync-js 3506
WhenImported: 20211024133557-0500 c168
WhenExported: 20211024135954-0500 c168
ExportedFrom: BBSESINF sync_js 3057
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Sun, 24 Oct 2021 11:35 UTC

Re: Discord webhook integration
By: Hunter-Z to MRO on Sun Oct 24 2021 11:14 am

> My final thoughts are:
> - It would be nice to have a canonical/supported way to script an action
> when Synchronet shuts down.
> - It would be nice to see some design consolidation of scripting triggers,
> as having to dig through module selections, fixed events,
> on-init-via-timed-menu events, event-triggered external programs,
> modopts.ini script hooks, etc. to find the best way to do something makes
> for a steep learning curve - especially when the answer is different
> depending on what you're trying to accomplish.

well i'm not sure if your needs are something the rest of the community needs. luckily synchronet is open source and has scripting options. if you have the creativity to think up something, you can pull it off. i've done it. sometimes it's an ugly hack but it looks good to the user.

if you dont have the programming ability you could always talk to someone and tip them for their hard work.
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

Discord webook integration

<6175E72F.3507.sync-js@vert.synchro.net>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=612&group=DOVE-Net.Synchronet_Javascript#612

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Hunter-Z
Subject: Discord webook integration
Message-ID: <6175E72F.3507.sync-js@vert.synchro.net>
Date: Sun, 24 Oct 2021 09:07:27 -0700
X-Comment-To: Hunter-Z
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6174C482.3500.sync-js@vert.synchro.net>
References: <6174C482.3500.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19a-Win32 master/7dc1bc798 Oct 24 2021 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20211024160727-0700 c1e0
WhenExported: 20211024175749-0700 c1e0
ExportedFrom: VERT sync-js 3507
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Sun, 24 Oct 2021 16:07 UTC

Re: Discord webook integration
By: Hunter-Z to All on Sat Oct 23 2021 07:27 pm

> Hello. I used to run a Synchronet BBS in the mid-late 1990s, and set up a
> modern version in a WinXP VirtualBox VM in 2015 for fun. I recently blew the
> dust off of this because some friends on Discord were interested in
> experiencing the BBS thing in a private setting.
>
> Since we're using Discord and Synchronet is now heavy into JavaScript, I
> thought I'd try hooking the two together. I've had limited success using an
> HTTPRequest from Synchronet's http.js to send POST requests to a Discord
> webhook URL, but I've run into some issues and limitations that I could use
> some advice on.
>
> I should mention up-front that I'm a novice at JavaScript, so I'm probably
> going about this all wrong. My native language is C++!
> +--------------------------+
> |Logon/logoff notifications|
> +--------------------------+
> The first thing I tried to do was have Synchronet tell people on Discord
> when someone logs on or off. Logon works great, even reporting the user and
> node number. Logoff, on the other hand, is problematic: It seems that
> regardless of whether I use the fixed event or an on-logoff event-driven
> external program entry, Synchronet terminates my JavaScript code before it
> can send the POST request! As an ugly hack, I was able to get it working by
> having a fixed logoff event call a .BAT file, which in turn calls jsexec -x,
> but there has to be a better way?

For non-interactive logout event, you want to set SCFG->External Programs->Fixed Events->Logout Event to execute your script (e.g. "?logout"). I tested this with a simple logout.js to logs some lines, runs a loop, sleeps 1 second, the complete script ran without getting terminated. One thing that might help you is to include "js.auto_terminate = false" in the beginning of your script.

> I'm also wondering if this is the best way to do any of this in general.
> What about just creating custom logon/logoff *modules* that wrap the default
> ones or something?

Not really sure what you're asking here. There is no "default" logout event.

> +-------------------------+
> |BBS up/down notifications|
> +-------------------------+
> I'd love to have something notify Discord when the BBS goes up or down, but
> there isn't an obvious way to do this either. I was able to get a "BBS up"
> notification to work by creating a timed even that is set to run on *no*
> days of the week, and to run on (re)init, but this again feels like a hack.

That's how I'd do it. But ideally, a BBS is a stable server (like a web server) and shouldn't need to be telling its users when it's online or offline. It should *always* (or almost alway) be online.

> I also don't see any way at all to trigger a "BBS down" event. I'm wondering
> if maybe I should just handle this externally to Synchronet, like maybe via
> a Windows Task Manager job or something?

Sure. Or just make a script that both sends your status update and terminates sbbs.

> +------------------------------+
> |External Program notifications|
> +------------------------------+
> Edit: Forgot to mention this. It would be great if I could somehow trigger a
> script when someone enters a door program, without having to edit every
> door's configuration to integrate it via a batch file or whatever.
>
>
> Any advice/thoughts appreciated.

Look at exec/prextrn.js and postxtrn.js.
--
digital man

Rush quote #47:
All of us get lost in the darkness, dreamers learn to steer by the stars
Norco, CA WX: 73.5°F, 53.0% humidity, 1 mph SSW wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Discord webook integration

<61800D86.3468.dove-syncjs@warensemble.com>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=613&group=DOVE-Net.Synchronet_Javascript#613

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: daitengu@VERT/ENSEMBLE (DaiTengu)
To: Hunter-Z
Subject: Discord webook integration
Message-ID: <61800D86.3468.dove-syncjs@warensemble.com>
Date: Mon, 1 Nov 2021 03:53:42 -0500
X-Comment-To: Hunter-Z
Path: rocksolidbbs.com!not-for-mail
Organization: War Ensemble BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6174C482.3500.sync-js@vert.synchro.net>
References: <6174C482.3500.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19a-Linux ensemble/1c891cf Oct 15 2021 GCC 4.8.5
X-FTN-CHRS: CP437 2
WhenImported: 20211101094827-0700 c1e0
WhenExported: 20211101115747-0700 c1e0
ExportedFrom: VERT sync-js 3508
WhenImported: 20211101105342-0500 c168
WhenExported: 20211101114829-0500 c168
ExportedFrom: ENSEMBLE dove-syncjs 3468
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: DaiTengu - Mon, 1 Nov 2021 08:53 UTC

Re: Discord webook integration
By: Hunter-Z to All on Sat Oct 23 2021 07:27 pm

Hu> Since we're using Discord and Synchronet is now heavy into JavaScript, I
Hu> thought I'd try hooking the two together. I've had limited success using
Hu> an HTTPRequest from Synchronet's http.js to send POST requests to a
Hu> Discord webhook URL, but I've run into some issues and limitations that I
Hu> could use some advice on.

Hey, so a couple years ago I expanded upon echicken's twitter.js library, and created a script to post to Twitter any time someone logged on, logged off, posted a message or ran a door game. (I also believe there's an option to tweet if someone uploads/downloads a file, but I don't think it works correctly).

https://github.com/DaiTengu/tweeter

That might be a good starting point, at least for the hooks you want.

DaiTengu

.... In the future, everyone will be famous for fifteen minutes.

---
■ Synchronet ■ War Ensemble BBS - The sport is war, total war - warensemble.com

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor