agendabot is a tool we developed to address the need for an "automated" moderation. agendabot is in fact a "supervised" moderation tool. It allows to platform administrators (Nextcloud admins) to create a schedule for meetings.
agendabot code is hosted by the great codeberg project
as a root user
download into nextcloud root folder and unzip
wget https://codeberg.org/EuComMeet/agenda-chatbot/archive/master.zip
unzip master.zip
move into the newly created agenda-bot folder, copy the agendabot.service into systemd and edit the conf accordingly to your install path&user
cd agenda-chatbot/
cp agendabot.service /etc/systemd/system/
vi /etc/systemd/system/agendabot.service
adjust permissions if needed to a www-data user
sudo chown -R www-data.www-data agenda-chatbot/
create agendabot.toml file into /etc folder and configure agendabot.toml accordingly to your programmed schedule as detailed in the following section
sudo vi /etc/agendabot.toml
REMEMBER: after conf done, reload systemd daemons before starting the service!
sudo systemctl daemon-reload
Programming agendabot is very simple. A markdown (.md) file is needed, with columns for timing, description, instructions. Below an example from EUCOMMEET:
duration | desc | it | en | de | pl | fr |
---|---|---|---|---|---|---|
1 | welcome participants | Benvenuti alla prima sessione del progetto EuComMeet! | Welcome in the first session of the EuComMeet project! | Willkommen bei der ersten Sitzung des EuComMeet-Projekts! | Witamy na pierwszej sesji projektu EuComMeet! | Bienvenue dans la première session de EuComMeet ! |
it is the first line of one out of three instruction files with five languages implemented, to be displayed accordingly to the users' locale. In the "duration", "1" means that at the minute 1 after the start, these instructions will be displayed. The sum of all the value into the first column "duration" will amount to the total duration of the meeting.
start
start the agendabot and display the first instruction in the provided .md file
next
close the current instruction and display the next one in the provided .md file
+5
add five (5) minutes to the current instruction time
!hurry
launch the "hurry" instruction (display according to the user's locale)
!silence
launch the "silence" instruction (display according to the user's locale)
create a conversation and rename it with "GROUP" / "NATIONAL" / "INTERNATIONAL" as PREFIX
GROUP > will follow agenda-1.md file instructions
NATIONAL > will follow agenda-2.md file instructions
INTERNATIONAL > will follow agenda-3.md instructions
N.B.: these configurations can be changed in the agendabot.toml
ask your sysadmin to:
delete existing agendabot rooms id's
rm agenda-bot/lastIds.json
sudo service agendabot restart
sudo service agendabot status
it should display something like the following:
ubuntu@nextcloud:~$ sudo service agendabot status
● agendabot.service - agenda-bot
Loaded: loaded (/etc/systemd/system/agendabot.service; disabled; vendor preset>
Active: active (running) since Mon 2023-11-27 15:50:56 CET; 35min ago
Main PID: 1337409 (start.sh)
Tasks: 12 (limit: 9491)
Memory: 114.9M
CGroup: /system.slice/agendabot.service
├─1337409 /bin/bash /home/ubuntu/agenda-bot/start.sh
└─1337958 node bin/bot.js -c /etc/agendabot.toml
Nov 27 16:26:45 nextcloud start.sh[1337958]: 1 [self@zdxkc3u7] Send poll Request
Nov 27 16:26:45 nextcloud start.sh[1337958]: 2 [self@gr9phuhj] Receives poll Request
Nov 27 16:26:45 nextcloud start.sh[1337958]: = [self@gr9phuhj] !json:{"type":"multi>
Nov 27 16:26:45 nextcloud start.sh[1337958]: 1 [self@gr9phuhj] Send poll Request
Nov 27 16:26:46 nextcloud start.sh[1337958]: 2 [self@s5v3qxds] Receives poll Request
Nov 27 16:26:46 nextcloud start.sh[1337958]: ∞ [self@s5v3qxds] l∞∞∞ping!
Nov 27 16:26:46 nextcloud start.sh[1337958]: 1 [self@s5v3qxds] Send poll Request
Nov 27 16:26:48 nextcloud start.sh[1337958]: 2 [self@frm6jbsj] Receives poll Request
Nov 27 16:26:48 nextcloud start.sh[1337958]: ∞ [self@frm6jbsj] l∞∞∞ping!
Nov 27 16:26:48 nextcloud start.sh[1337958]: 1 [self@frm6jbsj] Send poll Request
here an example of the configuration file agendabot.toml
ubuntu@nextcloud:~$ cat /etc/agendabot.toml
[agenda.local]
# specify the absolute path where agendabot can find the first instruction file
path = '/var/www/datinextcloud/amministratore/files/bot-commands/agenda-1.md'
# specify the label
label = 'GROUP'
# specify if prefix (true) or suffix (false)
prefix = true
[agenda.national]
# specify the absolute path where agendabot can find the second instruction file
path = '/var/www/datinextcloud/amministratore/files/bot-commands/agenda-2.md'
# specify the label
label = 'NATIONAL'
# specify if prefix (true) or suffix (false)
prefix = true
[agenda.international]
# specify the absolute path where agendabot can find the second instruction file
path = '/var/www/datinextcloud/amministratore/files/bot-commands/agenda-3.md'
# specify the label
label = 'INTERNATIONAL'
# specify if prefix (true) or suffix (false)
prefix = true
[bot]
# specify the id of the room where abuse signal will be sent
abuseSignalRoom = 'ayj673mw'
# specify the id of the room where logs will be sent
logsRoom = 'ayj673mw'
# specify if debug is enabled (true) or not (false)
debug = true
[nextcloud]
# specify the absolute Nextcloud install URL
server = 'https://nextcloud.eucommeet.eu'
# specify the username of the bot. IT HAS TO BE A REAL Nextcloud user!
user = 'Meety'
# specify the password of the bot. IT HAS TO BE THE REAL password of the Nextcloud user!
pass = 'XXXXXXXXXXXX'