From db0110393f70987c9b87643594d18df935ef91d5 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 4 Nov 2024 13:43:06 -0500 Subject: added the ability to use channels with password, fixes 35 --- README.md | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index b6fa514..8e67ac1 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Which LLM provider to use. The supported options are: - [ollama](https://github.com/ollama/ollama) - chatgpt - gemini +- [openrouter](https://openrouter.ai/) #### apikey @@ -170,9 +171,12 @@ admins = ["admin1", "admin2"] List of channels for the bot to join when it connects to the server. ``` -ircChannels = ["#channel1", "#channel2"] +ircChannels = [["#channel1","channel1password"], ["#channel2",""], ["#channel3"]] ``` +In the provided example, milla will attempt to join `#channel1` with the provided password while for the other two channels, it will try to join normally.
+This behaviour is consistant across all places where a channel name is the input.
+ Please note that the bot does not have to join a channel to be usable. One can simply query the bot directly as well.
#### databaseUser @@ -195,6 +199,10 @@ Name of the database. List of channels that the bot will scrape into a database table. You can later on use these databases for the custom commands.
+``` +ircChannels = [["#channel1","channel1password"], ["#channel2",""], ["#channel3"]] +``` + #### ircProxy Determines which proxy to use to connect to the IRC network: @@ -293,9 +301,9 @@ Watchlists allow you to specify a list of channels to watch. The watched values ```toml [ircd.devinet_terra.watchlist.security] -watchList = ["#securityfeeds"] +watchList = [["#securityfeeds"]] watchFiles = ["/watchfiles/voidbox.list"] -alertChannel = "#milla_alerts" +alertChannel = ["#milla_alerts"] eventTypes = ["PRIVMSG"] fgColor = 0 bgColor = 28 @@ -339,7 +347,7 @@ ircNick = "milla" enableSasl = true ircSaslUser = "milla" ircSaslPass = "xxxxx" -ircChannels = ["##chan1", "##chan2"] +ircChannels = [["##chan1"], ["##chan2"]] temp = 0.2 requestTimeout = 10 millaReconnectDelay = 60 @@ -356,7 +364,7 @@ databaseAddress = "postgres:5432" databasePassword = "changeme" databaseUser = "devi" databaseName = "milla" -scrapeChannels = ["#soulhack", "#warroom", "#securityfeeds"] +scrapeChannels = [["#soulhack"], ["#warroom"], ["#securityfeeds"]] ircProxy = "socks5://127.0.0.1:9050" llmProxy = "http://127.0.0.1:8180" skipTLSVerify = false @@ -365,18 +373,18 @@ adminOnly = false plugins = ["/plugins/ip.lua", "/plugins/urban.lua"] context = ["please respond in french even if i use another language unless you are specifically asked to use any language other than french"] [ircd.devinet.watchlist.security] -watchList = ["#securityfeeds"] +watchList = [["#securityfeeds"]] watchFiles = ["/watchfiles/voidbox.list"] -alertChannel = "#milla_alerts" +alertChannel = ["#milla_alerts"] eventTypes = ["PRIVMSG"] fgColor = 0 bgColor = 28 [ircd.devinet.rss.manga] rssFile = "/rssfeeds/manga.json" -channel = "#manga" +channel = ["#manga"] [ircd.devinet.rss.anime] rssFile = "/rssfeeds/anime.json" -channel = "#anime" +channel = ["#anime"] [ircd.liberanet] ircServer = "irc.libera.chat" @@ -399,7 +407,7 @@ useTLS = true disableSTSFallback = true allowFlood = false admins = ["noone_has_this_nick"] -ircChannels = ["##milla1", "##milla2"] +ircChannels = [["##milla1"], ["##milla2"]] debug = true out = true ircProxy = "socks5://127.0.0.1:9051" @@ -441,7 +449,7 @@ Returns memory stats for milla. #### join -Joins a channel: `/join #channel` +Joins a channel: `/join #channel [optional_password]` #### leave @@ -719,9 +727,11 @@ milla.send_message(msg, target) ``` ```lua -milla.join_channel(channel) +milla.join_channel(channel,password) ``` +Please note that even if the channel doesn't have a password, it still will require the second argument and the second argument must be empty. + ```lua milla.part_channel(channel) ``` @@ -738,6 +748,10 @@ milla.send_gemini_request(prompt) milla.send_chatgpt_request(prompt) ``` +```lua +milla.send_or_request(prompt) +``` + ```lua milla.query_db(query) ``` -- cgit v1.2.3