SMOLNET PORTAL home about changes

2022-06-20 Discord Bot


I just came back from a super short run, took a shower, now I need to fix myself some dinner – I’m thinking self-made bread and hummus? – and in half an hour there’s a game starting…


I wrote a Discord bot that may or may not help us in our multi-referee campaign. It’s inspired by the “Weather Goblin” bot people on the ADDKON Server are using.

Basically it allows us to keep accurate time records! You know how important those are. 😆

Right now it assumes a 1:1 calendar for the game. So “today” is always the current date and if you play a week later, then it’s seven days later in the game world, too. The Weather Goblin has a lot more features in this regard and I’m not sure I need those: it does Greyhawk dates, and it allows every channel to advance along the timeline at their own pace so that people can fall behind or rush ahead of “normal time”. My bot just has one timeline.

Basically it allows you to take notes that are valid for a certain range of days. You could for example create a note for today saying a caravan left a city, or you could create a note saying that a particular character was studying for a week, or the day after the game you could create a note saying that from yesterday until two days in the future a character is recovering in town. Other people can then look at the notes for a particular date and by default the notes for today are being shown. In this case it would tell you that a caravan is leaving, that a character was studying until 2022-06-27, and that another character was recovering until 2022-06-22.

It’s written in Perl, for German users, and the source code is available:

norn (https://src.alexschroeder.ch)


Screenshot:

Alex: @Norn notiz Maeva, Kahina and the others leave Selina's Harbour Norn: Ist notiert. Alex: @Norn notiz bis +1 Arrival of Maeva, Kahina and the others arrive at Gisela's Norn: Ist notiert. Alex: @Norn datum Norn: 2022-06-20 - kensanata: Maeva, Kahina and the others leave Selina's Harbour - kensanata: Arrival of Maeva, Kahina and the others arrive at Gisela's (bis 2022-06-21)


Yeah, the Monday Games are in both English and German. 😀

Montag in Zürich (https://campaignwiki.org)


(Official help pages: Norn.)

Norn


​#RPG #Programming #Norn ​#Programming #Norn ​#Norn

**2022-06-21**. Well, now it speaks English, too, and in the manner of the IRC bots I know, it learn and serve arbitrary facts. Currently just one per question with silent overwrites.

Alex: @Norn answer to hi with Yo! 😄 Norn: Will do. Alex: @Norn hi Norn: Yo! 😄


**2022-06-22**. And now it works for IRC, too.

07:52 <kensanata> norn: hi
07:52 <norn> Yo! 😄
07:58 <kensanata> norn: state
07:58 <norn> 2022-06-22: no events


I have to fight the urge to turn this into a gateway.



OK, the bot can now send messages between IRC and Discord.

On IRC:

17:00 <wandererbill> norn: sag discord, wir sind hier drüben
    auf irc.otherworlders.org
17:00 <norn> Habe ich weitergeleitet.


On Discord:

Norn BOT — heute um 15:00 Uhr
wir sind hier drüben auf irc.otherworlders.org – wandererbill


Nice.

**2022-06-23**. The bot now keeps a separate context for each channel. That is, the notes and answers for one channel do not affect the notes and answers for other channels. If a channel shares the same name on IRC and Discord, that counts as the same context (and you can tell the bot to send messages to the other side).

At the moment the bot can only connect to a single IRC server and behaviour is undefined when it gets invited to multiple Discord servers sharing a channel name. Are they “the same”? I don’t know. Perhaps they should count as “one”.

Response: 20 (Success), text/gemini
Original URLgemini://alexschroeder.ch/2022-06-20_Discord_Bot
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8