foodssoli.blogg.se

Seance ritual
Seance ritual













seance ritual

#Seance ritual install

To install seance and sdnotify for this user use sudo -u seance pip3 install -user sdnotify git+. To avoid installing Séance globally, which might be ill-advised, you can create a home directory for the user, something like sudo useradd -create-home -home-dir /srv/seance seance will create a home directory for the user in /srv/seance.

seance ritual

Such a user can be created with sudo useradd seance. It is suggested that you create a specific non-privileged user to run the bot under, the service config assumes this user is called "seance". If you do not wish to enable this feature, you should remove the -systemd-notify argument from the provided service.

seance ritual

Note that for proper systemd support the Python package sdnotify is also required ( pip3 install sdnotify). There is also a sample file for running the Séance Discord bot as a systemd service in contrib. For example, passing -prefix b allows you to run the chat command b!status to set the status for that specific instance of Séance. This is intended for cases where a single Discord user has more than one associated Séance bot, in order to be able to direct commands to a particular instance. The Séance CLI also takes an optional argument -prefix, which is an additional prefix to accept commands with.

  • !presence - sets the bot's presence to the specified value, or sets it to synchronize it to the reference user.
  • !status - sets the bot's status ("playing" is the default if not specified).
  • !s/pattern/replacement - takes a reply, and a sed-style substitution command to edit a message.
  • !edit - takes a reply or a link to a message, and the new message content.
  • Once started, the bot also accepts a few chat commands: Options specified on the command line override options specified in a configuration file.Īn example configuration file (which is functionally identical to the seance-discord CLI example invocation above) can be found in contrib/. Specify the config file to use on the command-line with -config /path/to/file (this is the one option that cannot itself be passed in a config file 😉). Okay, that sounds really complicated, so here's an example, where the format for proxying messages is anything that starts b: - capital or lowercase. The pattern must include a named capture group called content, which defines the content to proxy. The Discord bot requires a Discord bot token passed with -token or the $SEANCE_DISCORD_TOKEN environment variable, the snowflake ID of the user to recognize messages to proxy from passed with -ref-user-id or the $SEANCE_DISCORD_REF_USER_ID environment variable, and a pattern in Python regex passed with -pattern or the $SEANCE_DISCORD_PATTERN environment variable. Once it is installed, the Discord bot can be run with seance-discord. Séance is written in Python, and as such can be easily installed via pip: pip3 install git+. It includes a Discord bot, and a very experimental Telegram bot. Séance is simple tool to make it easy to proxy messages under a bot account.















    Seance ritual