Configure bot name + refactoring.

This commit is contained in:
John Livingston
2023-09-19 18:56:39 +02:00
parent 9e7d9c6069
commit 4fe972dc10
7 changed files with 78 additions and 38 deletions

View File

@ -27,6 +27,7 @@ async function vivifyConfigurationChannel (
const data = new FormData(form)
const channelConfigurationOptions: ChannelConfigurationOptions = {
bot: data.get('bot') === '1',
botNickname: data.get('bot_nickname')?.toString() ?? '',
bannedJIDs: (data.get('banned_jids')?.toString() ?? '').split(/\r?\n|\r|\n/g),
forbiddenWords: (data.get('forbidden_words')?.toString() ?? '').split(/\r?\n|\r|\n/g)
}