Skip to content

DmitrySokolov/zimbra-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zimbra-bot

Discord bot for Zimbra server.

Install

  • install Node.js
  • install packages: cd zimbra-bot && npm install

Run

Supported commands

!zimbra help

Prints all supported commands.

Calendar commands

Allows to watch for events of a Zimbra Calendar, and to show event notifications.

!zimbra cal help

Prints the help message on 'calendar' commands.

!zimbra cal list

Prints all watched calendars.

!zimbra cal watch {name} {url} {auth_token}

Add the calendar to the watch list:

  • url - calendar URL
  • auth_token - Zimbra auth token (ZM_AUTH_TOKEN)

!zimbra cal unwatch {name}

Remove the calendar from the watch list:

  • url - calendar URL

!zimbra cal events

Prints upcoming events.

Tuning

index.js

  • const prefix = '!zimbra' - commands prefix

commands/cal.js

  • const checkDbTimeout = 10000 - timeout to check DB changes (10 sec), re-reads DB only if env.CAL_CHANGED var is set
  • const checkURLsTimeout = 120000 - timeout to check a calendar URL (120 sec)

Event notifications

The simple event notification consists of:

  • title
  • description
  • image URL

Simple event notification

Another option is to use Discord RichEmbed object:

Discrod RichEmbed event notification

You can use any embed visualizer to create a notification.