Giter Club home page Giter Club logo

limnoria-plugins's Introduction

paypal

Limnoria (an IRC bot) plugins I wrote or forked. All working under Python 3.

Requires Limnoria, obviously. Additional requirements in requirements.txt files

Plugins assume Python 3.6+, though many may still work with older versions.

Easy installation:

load PluginDownloader
repolist oddluck
install oddluck PluginName
cd YourBotDirectory/plugins/PluginName
python3 -m pip install -r requirements.txt --upgrade
load PluginName

See README files in plugin directories for additional information and instructions.

gitlab mirror: https://gitlab.com/oddluck/limnoria-plugins

License: WTFPL Code style: black

limnoria-plugins's People

Contributors

agentphantom avatar alexberryman avatar benschomp avatar brrr2 avatar butterscotchstallion avatar cottongin avatar csssuf avatar cydrobolt avatar exiles avatar jamessan avatar jazzahn avatar lunchdump avatar mbklein avatar mikaela avatar mmueller avatar oddluck avatar ormanya avatar progval avatar resistivecorpse avatar rootcoma avatar rostob avatar santigl avatar scottjab avatar spiderdave avatar tacerus avatar tannn avatar tehpegasus avatar thomassross avatar veggiematts avatar znuff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

limnoria-plugins's Issues

SpiffyTitles ~ (REDIRECT) Title: Title:

To have the above pop-up whenever a shortened URL is used is somewhat annoying; especially the Title: Title: bit.
Using config channel plugins.SpiffyTitles.default.template to change that has no effect.
Any assistance would be helpful. 😊

Spiffy Titles - IMDB Set omdbAPI key

Youtube was a doddle to set up using your guide but IMDB manual seems a bit vague to me, how do i set my API key for the imdb part of the plugin? A full command please as i am very new to this bot.

SpiffyTitles doesn't work anymore for me in Windows 11 because of error spawning processes

SpiffyTitles randomly stopped working for me on Windows 11. I had to switch the bot to running on WSL, now it works. I tried rebooting, I tried installing the latest Python and installing the latest Limnoria on it, didn't help. Here's the traceback:

Traceback (most recent call last):
  File "C:\venv\dumb_bot\Lib\site-packages\supybot\plugins\SedRegex\plugin.py", line 180, in replacer
    message = process(self._replacer_process, irc, msg,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\venv\dumb_bot\Lib\site-packages\supybot\commands.py", line 141, in process
    p.start()
  File "C:\Python3.11.2\Lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
                  ^^^^^^^^^^^^^^^^^
  File "C:\Python3.11.2\Lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python3.11.2\Lib\multiprocessing\context.py", line 336, in _Popen
    return Popen(process_obj)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Python3.11.2\Lib\multiprocessing\popen_spawn_win32.py", line 94, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Python3.11.2\Lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: args[0] from __newobj__ args has the wrong class
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python3.11.2\Lib\multiprocessing\spawn.py", line 111, in spawn_main
    new_handle = reduction.duplicate(pipe_handle,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python3.11.2\Lib\multiprocessing\reduction.py", line 79, in duplicate
    return _winapi.DuplicateHandle(
           ^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 6] The handle is invalid
Advertisement

Duckhunt longest times doesn't update

[2021.10.12-16.24.04] <@chat> Longest time: MetaNova with 63481.87 seconds (this is your new longest time
in this channel! Your previous longest time was 5.51)
[2021.10.12-16.47.02] <@chat> Longest time: MetaNova with 134.22 seconds (this is your new longest time
in this channel! Your previous longest time was 5.51)

Also:

<mornfall> +listtimes
<@chat> \_o< ~ DuckHunt top-5 fastest times for ##chat ~ >o_/
<@chat> (xicedjava37x: 1.04) (xwoodyj21x: 1.06) (xtallguyx: 1.1) (xshadow255x: 1.2) (x^-^hix: 1.33)
<@chat> \_o< ~ DuckHunt top-5 longest times for ##chat ~ >o_/
<@chat> (xbeefpotatox: 1 day, 12:11:30) (xHalianx: 6:34:47) (xrndusrx: 0:50:34) (xoxekx: 0:29:45) (xLooCfurx: 0:25:41)
<MetaNova> +rmtime beefpotato
<@chat> An error has occurred and has been logged. Check the logs for more information.
INFO 2021-10-13T12:44:04 rmtime called on ##chat by "MetaNova!zero-one@znc/supporter/metanova".
ERROR 2021-10-13T12:44:04 Uncaught exception in ['rmtime'].
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/supybot/callbacks.py", line 1583, in _callCommand
    self.callCommand(command, irc, msg, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/supybot/utils/python.py", line 91, in g
    f(self, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/supybot/callbacks.py", line 1549, in callCommand
    method(irc, msg, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/supybot/commands.py", line 1142, in newf
    f(self, irc, msg, args, *state.args, **state.kwargs)
  File "/home/ircbot/Limnoria/plugins/DuckHunt/plugin.py", line 606, in rmtime
    del self.channeltimes[channel][nick]
KeyError: 'beefpotato'
ERROR 2021-10-13T12:44:04 Exception id: 0xcfb91

SpiffyTitles - Add Steam handler

Add a configurable SpiffyTitles template for parsing game titles from Steam links

Links

Game links from Steam are follow this format afaik: https://store.steampowered.com/app/n/game-title, where n seems to be the numeric product id, and game-title seems to be purely cosmetic or for seo

Variables

I think the basic variables for the template can be:

Variables Description
title Product title
genre Product genre found within <div class="popup_menu_subheader">
all_reviews Product review summary of all reviews and total count eg. "Mostly positive (45,654)"
recent_reviews Product review summary of recent reviews and count, eg. "Mixed (4,324)"
description Description of product @ <meta property="og:description" content="...>
date Release date of product
developer Product developer
publisher Product publisher
price Product price
tags "Popular user-defined tags for this product"

Notes

Tweety - suggestion: provide direct link to tweet

Hey there,

so far Tweety is running for quite a while now and it is working great. Thank you.

As a suggestion from users it would be nice if Tweety could provide a (shortened) directlink to the actual tweet by option. At the moment it only includes links that were actually a part the parsed tweet.

As always thanks for reading.

Cheers
Werner

SpiffyTitles doesn't work with Python 3.12 because they removed the 'imp' module

I just walked someone through installing Limnoria and a few plugins on their computer, and I had them install Python 3.12 assuming it would work because YOLO (I use Python 3.11), and SpiffyTitles won't load because the 'imp' module is missing. A little research revealed that it was removed from Python in version 3.12 (in 3.11 it's apparently only deprecated).

So I told her she had to install Python 3.11 and we'd have to do some things over again, or she could just use the 'Web' plugin. She's currently using the 'Web' plugin, but it doesn't seem to work for youtu.be links and who knows what else.

Also, btw, !plugindownloader install oddluck SpiffyTitles doesn't install the requirements. I don't know if that's SpiffyTitles' fault or if it's possible to make it work right, since I don't know the details of how !plugindownloader works.

YouTube: UnboundLocalError while handling error

Hi, someone on #supybot just posted this error:

Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:   File "/usr/lib/python3/dist-packages/supybot/callbacks.py", line 1300, in callCommand
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:     method(irc, msg, *args, **kwargs)
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:   File "/usr/lib/python3/dist-packages/supybot/commands.py", line 1109, in newf
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:     f(self, irc, msg, args, *state.args, **state.kwargs)
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:   File "/NSCS/bots/plugins/YouTube/plugin.py", line 142, in yt
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:     video_id = self.dosearch(query, msg.channel)
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:   File "/NSCS/bots/plugins/YouTube/plugin.py", line 80, in dosearch
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]:     "YouTube: Error retrieving data from API: %s" % request.content.decode()
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: UnboundLocalError: local variable 'request' referenced before assignment
Dec 01 10:29:48 sturtz.cf SturtzBot[1296]: ERROR 2020-12-01T10:29:48 Exception id: 0xc0473

I'm guessing this happens when utils.web.getUrl(api_url).decode() itself crashes; you should probably move it out of this try block into its own.

Few ideas for the DuckHunt plugin

  • Add a DuckHunt.minPoints and DuckHunt.maxPoints which would give a random amount of points between those two values to the user that shoots the duck.
  • Add a endless mode that would make the hunt endless instead of the default 5 ducks per hunt. The endless mode would make the duck run away after a defined DuckHunt.maxWaitShoot
  • Add an option to add a tail to the duck and randomise the tail and body, which would be helpful to avoid people that create automatic triggers in their scripts to the automatically shoot ducks based in the duck body.
    Below, there's an example of a eggdrop script that does such:
    [11:49:00] <+Duckie> -.,.-°`'°-.,.-°`'° §_@< QUACK
    [11:56:00] <+Duckie> -.,,.-°''°-.,,.-°''° §_ò{ QUAAAC
    [12:15:01] <+Duckie> -.,.-°`'°-.,.-°`'° _^< KWACK
    [12:26:00] <+Duckie> .,,.°'`'°.,,.°'`'° §_Ø< KAACK

Cheers!

Edit: added a better explanation to the endless game mode

SpiffyTitles: YouTube - Get Channel Info

When someone pastes a YT-Url to a Users YT-Channel, the bot only shows 'YouTube' and the Bot-Console shows:
SpiffyTitles: error getting video id from https://www.youtube.com/channel/.........

Tweety (help)

im getting this "ERROR: Something went wrong trying to search Twitter. (None)" with every request, is this something i did wrong or its a twitter side thing? anyone has it working?

i set the tweety.consumerkeys/secret with my twitter "API Key and Secret" and the access ones with the "Access Token and Secret" (hope that was the right way), runned the requirements with no errors also

(its the twitter free tier btw)

tyvm

SpiffyTitles - FeedBurner on initial HTTP-Connect

There seems to be a problem when a Link is pasted with http://

http://feeds.reuters.com/~r/Reuters/worldNews/~3/i8QnBIie36s/churchill-statue-boarded-up-ahead-of-expected-uk-protests-on-saturday-idUSKBN23J1LO

But the URL gets rewritten to use https

Console shows:
SpiffyTitles HTTPError: 404 Client Error: Feed not found error: FeedBurner cannot locate this feed URI. for url: http://feeds.reuters.com/

SpiffyTitles: Unable to parse title from html response for https://feeds.reuters.com/

Firefox with https: PR_END_OF_FILE_ERROR

When entering the http-URL in Firefox, it gets redirected to
https://www.reuters.com/article/us-minneapolis-police-protests-britain/churchill-statue-boarded-up-ahead-of-expected-uk-protests-on-saturday-idUSKBN23J1LO?feedType=RSS&feedName=worldNews&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Reuters%2FworldNews+%28Reuters+World+News%29

Another Example:
http://rss.cnn.com/~r/rss/cnn_allpolitics/~3/FSM2YM9SXNs/index.html

Geo

pip install geoip2

Installing collected packages: urllib3, idna, certifi, chardet, requests, ipaddress, maxminddb, geoip2
Successfully installed certifi-2019.11.28 chardet-3.0.4 geoip2-3.0.0 idna-2.9 ipaddress-1.0.23 maxminddb-1.5.2 requests-2.23.0 urllib3-1.25.8

-load geo
admin: Error: The Geo plugin requires geoip2 be installed. Load aborted.

I installed geopip2, from the user & as admin on the box. The bot still reply it is not, even after reboot.

corona top10 rank

There's a little trouble with top10 rank:
-corona usa
USA: World Rank: #2 | Cases: 300,028 (+22,867) (+8.3%) | Deaths: 8,137 (2.7%) (+733) (+9.9%) | Recovered: 14,464 (4.8%) | Active: 277,427 (271,111 Mild) (6,316 Serious) (97.7%/2.3%) | Cases/1M: 906 | Deaths/1M: 25 | Updated: 5.7m ago
-corona --top10
#1: Total: (1,169,323/62,730), #2: USA (300,028/8,137), #3: Spain (124,736/11,744), #4: Italy (124,632/15,362), #5: Germany (92,150/1,330), #6: France (82,165/6,507), #7: China (81,639/3,326), #8: Iran (55,743/3,452), #9: UK (41,903/4,313), #10: Turkey (20,921/425) | Updated: 5.8m ago

Disable all SpiffyTitles handlers at once

I use SpiffyTitles with some of my bots and usually mostly because of 2-3 handlers, like YouTube, Reddit and Twitch.

It would be great to have a way to disable all handlers (except the default one, probably), so then it's easier to re-enable/set the ones I need/want.

Cheers

CBB plugin results in error

Using the CBB plugin causes bot to respond with "An error has occurred and has been logged. Check the logs for more information."

Logs show the following error:

ERROR 2022-11-27T17:04:01 Uncaught exception in ['cbb'].
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/supybot/callbacks.py", line 1587, in _callCommand
    self.callCommand(command, irc, msg, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/supybot/utils/python.py", line 91, in g
    f(self, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/supybot/callbacks.py", line 1553, in callCommand
    method(irc, msg, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/supybot/commands.py", line 1163, in newf
    f(self, irc, msg, args, *state.args, **state.kwargs)
  File "/config/plugins/CBB/plugin.py", line 108, in cbb
    SCORES = self._checkscores()
  File "/config/plugins/CBB/plugin.py", line 226, in _checkscores
    0 < comp["competitors"][0]["curatedRank"]["current"] <= 25
KeyError: 'curatedRank'
ERROR 2022-11-27T17:04:01 Exception id: 0xa1aa3

SpiffyTitles - documentation is unclear on channel-specific enabling (Web style)

2021-147 10:33:42 EEST <Trebek> Mikaela: Whether to add additional information about regular links. (Current value: True)
2021-147 10:34:10 EEST <Mikaela> but then I would need to still enable/disable the other things like youtube per-channel?
2021-147 10:35:40 EEST <oddluck> everything is enabled by default and falls back to default handler if a key isn't set for youtube for example, it's a drop in replacement for the web plugin

I was under impression that I have to use the .whitelist/.blacklist instead of there being a single variable deciding whether to message a channel at all.

Corona

Hi, with the new update we lost the ability to see canadian province status. We had it before.. ;/

Tweety/SpiffyTitles - Twitter Events

Bot isnt able to announce a 'Twitter-Event' URL - https://twitter.com/i/events/1272797478157299712 :

ERROR 2020-06-17T01:59:14 SpiffyTitles: Twitter Error: 404 Client Error: Not Found for url: https://publish.twitter.com/oembed?url=https://twitter.com/i/events/1272797478157299712&omit_script=True
ERROR 2020-06-17T01:59:14 SpiffyTitles: Unable to parse title from html response for https://twitter.com/i/events/1272797478157299712        

Bot just shows the default Errormsg in IRC.

[Tweety] Allow --nort in tsearch

Hey there,

I would like to suggest to add the --nort switch to the tsearch command to suppress results that have been retweeted by someone else.

Thanks for reading.

Werner

ASCII doesn't work

I used supybot on windows 10 and loaded the plugin. (OPutils15) Then I decided to run the bot on my raspberry pi. So I did. Both times I used the python module version of supybot. The raspberry pi bot itself works, but it cannot load the ASCII plugin. Oddluck, please join EFnet again. My raspberry pi bot is currently on #asciiart and #asciiartbotgithub. It's nickname is Genius101. Message me on IRC (I am user-3456) for the exact error message.

P.S. Oddluck, I really miss you on EFnet!

Youtube is going to remove dislike counts from the API on 2021-12-13

Subject: Important update from YouTube API Services: Making the dislike count private
Date: Wed, 10 Nov 2021 09:28:34 -0800
From: YouTube API Services [email protected]
Reply-To: YouTube API Services [email protected]

YouTube


Dear YouTube API developer,

We would like to inform you of upcoming changes to YouTube that will impact the data available via the Data API starting December 13, 2021.

On November 10, YouTube will be making the public dislike count private. Users will still be able to dislike videos, and creators will still have access to the dislike counts for their own videos in YouTube Studio. Learn more about this change in our https://notifications.google.com/g/p/AD-FnEzKe6JQVbVbeG2NZaj4WcCbJFyAkrIHR0B2SMzzo8EG0fq-aAZsWFhF0KGeJloPTdYD-C2svjrri5HzJGI6RkpppaRcRbJYvXQiyg5YoF6tp7T1p2C_ro7F3iKFeBrM6eUC-ZYblog post.

To make the dislike count private across the platform, we also will be removing public access to the dislike count data via our API.

Here are details on how this will and will not affect the API:

As a reminder, you must agree to the https://notifications.google.com/g/p/AD-FnEztMF755NBRoVPNNqJ9XgsCk70je1fmZ-ZbTpJ7I0Hk8KZ64l6QRP4dWFPg2PsCLMoRoT-x_lvg5zKMEQW7NSBwhem3KGknPQlDBqu7e8FZj3oPjGfXwmeP_QXXDgNWbIYIuPb0B1MBmTX4wskDFjrDZAterms and https://notifications.google.com/g/p/AD-FnEx7kUL8BS5pRLLzYI1-luHc4PluJNaj7lKiOHzuYo_OHZ5Fl9DG5bF3BoBXxiBdBxyTINZg0Q7Q7P88Plow8JlRxf_rvqRG0SyikGy7s6K195tgSwx4QM7h2WAUj3mYHyjbeu3WpeMsOUcpolicies to access or use any YouTube API Services.

Thank you for being a YouTube API developer.

Sincerely, The YouTube API Services team


You received this mandatory email service announcement to update you about important changes to your YouTube account.

(c) 2021 Google Ireland Ltd Gordon House, Barrow Street Dublin 4, Ireland

SpiffyTitles - Flood Protection

It would be nice to be able to configure some Flood-Setting directly in SpiffyTitles.
Some Users paste plenty of URLs in the same Line and repeating this multiple Times.
Then the Bot seems to work through all these URLs, even when these are all the same, causing Spam in the Chan.

Checked AttackProtector and ChanTracker, but these 'only' work when the Bot is OP.

Would be nice if there are some SpiffyTitle-Variables to ignore these Users after 'n' URLs for 'n' Seconds.
Also a Check to not write the same Url-Title in 'n' Seconds, even when pasted from different Users.
Beside these, also nice would be, to be able to set something like overall 'n' URL-Announcements in Channel.
While thinking about it - some Variable for 'how many urls in one Line by User' are checked/displayed.

SpiffyTitles - Twitch-API

Been using latest Version and configured supybot.plugins.SpiffyTitles.twitch.clientID to my Twitch ClientID.

Latest URL i used for testing was https://www.twitch.tv/pietsmiet

When pasting any Twitch-Url theres no Output to IRC, beside 'Twitch' and the Bot-Console shows:

SpiffytTitles: Twitch Error: 401 Client Error: Unauthorized for url: https://api.twitch.tv/helix/streams?user_login=pietsmiet

SpiffyTitles - YouTube Music artists and albums aren't handled resulting to simple title "YouTube Music"

Pasting a YouTube Music artist or album link will simply return to "YouTube Music" instead of the actual title.


2021-W32-5 22:46:28 +0300 <+Aminda> https://music.youtube.com/channel/UCA1tzQiUweOGdzynVXRCTzQ
2021-W32-5 22:46:30 +0300 <~katyusha> ^ YouTube Music
2021-W32-5 22:46:33 +0300 <+Aminda> https://music.youtube.com/playlist?list=OLAK5uy_k_IIpFnaYoUxL7oE6RnloghQD9eFA0BBU
2021-W32-5 22:46:34 +0300 <~katyusha> ^ YouTube Music
2021-W32-5 22:46:41 +0300 <+Aminda> https://music.youtube.com/watch?v=zAB5WU1g7lg
2021-W32-5 22:46:41 +0300 <~katyusha> ^ ► YouTube :: Schala's Theme (From "Chrono Trigger") :: Duration: 03:02 :: Views: 3,007 :: Uploader: Kara Comparetto - Topic :: Uploaded: 2020-01-28 :: 44 ▲ :: 8 ▼ ::0 comments


The bot console returns:

2021-W32-5 22:41:43 +0300 ERROR 2021-08-13T21:41:40 supybot SpiffyTitles: error getting video id from https://music.youtube.com/channel/UCq69aDJl1r6ZmgFyMAoD6jg
2021-W32-5 22:46:30 +0300 ERROR 2021-08-13T21:46:28 supybot SpiffyTitles: error getting video id from https://music.youtube.com/channel/UCA1tzQiUweOGdzynVXRCTzQ
2021-W32-5 22:46:33 +0300 ERROR 2021-08-13T21:46:33 supybot SpiffyTitles: error getting video id from https://music.youtube.com/playlist?list=OLAK5uy_k_IIpFnaYoUxL7oE6RnloghQD9eFA0BBU

  • 2021-W32-5 22:50:04 +0300 <~katyusha> The current (running) version of this Limnoria is 2021.07.16, running on Python 3.7.2 (default, Jun 22 2021, 19:21:11) [GCC 7.5.0]. The newest versions available online are 2021.07.21 (in master), 2021.08.12 (in testing).

UrbanDictionary.maxNumberOfDefinitions seems to have no effect

<@MetaNova> +help ud
<+chat> (ud <a global alias, 0 arguments>) -- Alias for "urbandictionary $*".
<@MetaNova> +cc ##llamas-private supybot.plugins.UrbanDictionary.maxNumberOfDefinitions
<+chat> 10
<@MetaNova> +ud test
<+chat> test :: 1. the main cause of [explosions].2. any thing [dreaded] that your "teachers" say is "good" for you. soon after, you explode for no reason.3. what scientists do to make stuff explode.4. when a sheet of paper explodes into [flames]. [ex:] 1. test [sodium] and water.2. SAT is a test.3. [Monkeys].4. you brought your [lighter] to test. [/ex] | slang for [testosterone]..[steroid] [hormones]. [ex:]  (6 more messages)
<@MetaNova> +cc ##llamas-private supybot.plugins.UrbanDictionary.maxNumberOfDefinitions 1
<+chat> Done.
<@MetaNova> +ud test
<+chat> test :: 1. the main cause of [explosions].2. any thing [dreaded] that your "teachers" say is "good" for you. soon after, you explode for no reason.3. what scientists do to make stuff explode.4. when a sheet of paper explodes into [flames]. [ex:] 1. test [sodium] and water.2. SAT is a test.3. [Monkeys].4. you brought your [lighter] to test. [/ex] | slang for [testosterone]..[steroid] [hormones]. [ex:]  (6 more messages)

However, calling --num 1 seems to work as intended:

<@MetaNova> +urbandictionary --num 1 test
<+chat> test :: 1. the main cause of [explosions].2. any thing [dreaded] that your "teachers" say is "good" for you. soon after, you explode for no reason.3. what scientists do to make stuff explode.4. when a sheet of paper explodes into [flames]. [ex:] 1. test [sodium] and water.2. SAT is a test.3. [Monkeys].4. you brought your [lighter] to test. [/ex]
<@MetaNova> +urbandictionary --disableexamples --num 1 test
<+chat> test :: 1. the main cause of [explosions].2. any thing [dreaded] that your "teachers" say is "good" for you. soon after, you explode for no reason.3. what scientists do to make stuff explode.4. when a sheet of paper explodes into [flames].

Consequently, I've simply changed my ud aka from urbandictionary $* to urbandictionary --disableexamples --num 1 $* and that's good enough for now, but it would be nice if UrbanDictionary.maxNumberOfDefinitions actually worked.

The current (running) version of this Limnoria is 2021.07.04, running on Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]. The newest versions available online are 2021.06.15 (in master), 2021.07.04 (in testing).

Latest git clone of oddluck/limnoria-plugins

SpiffyTitles no longer pulling for reddit -- 403

This is in the log. The URL is valid, however.

ERROR 2023-12-17T13:18:49 supybot SpiffyTitles: Reddit Error: 403 Client Error: Blocked for url: https://www.reddit.com/r/Pizza/comments/18keaxz.json

SpiffyTitles - Unique HTTP 451 Error Message

It would be nice, if there would be a separate Error-Message for the 451-HTTP Server response.
Currently these are handled like a regular Connection-Problem, but the cause is a legal Issue - from the Console:

SpiffyTitles HTTPError: 451 Client Error: Unavailable For Legal Reasons for url: https://..........

This for example happens, when the Bot runs on a EU-Shell (GDPR) and trys to connect some US-Websites.

[Jeopardy] Add slowMode option to the plugin

Currently we have supybot.plugins.Jeopardy.inactiveShutoff which makes the bot stop the game after X unanswered questions.

With the option supybot.plugins.Jeopardy.slowMode [False|True], instead stopping the game because no one is playing or are actually busy, we'd have the game to slow down.

Basically this option would double the supybot.plugins.Jeopardy.delay and the supybot.plugins.Jeopardy.timeout time, until a user correctly answer which would reset the slowMode to the normal mode.

So, if we have supybot.plugins.Jeopardy.delay set to 60 and the supybot.plugins.Jeopardy.timeout set to 90, they'd be turned into 120 and 180 respectively.

Few things to take in account

  1. If plugins.Jeopardy.inactiveShutoff is >= 1, plugins.Jeopardy.slowMode would be automatically set to False
  2. If plugins.Jeopardy.slowMode is True, plugins.Jeopardy.inactiveShutoff would be automatically set to 0

I hope this is enough understandable.

Cheers!

IMDB not pulling rating score

I have noticed recently that the rating is no longer showing, just N/A, along with other things also showing N/A

^ IMDb :: The Continental: From the World of John Wick (2023, United States, [TV-MA], Action, Crime, Thriller, N/A) :: IMDb: N/A | MC: None | RT: None :: Set in 1970s New York City, The Continental explores the origin of the iconic hotel-for-assassins centerpiece of the John Wick universe seen through the eyes and action of a young Winston Scott. :: Director: N/A :: Cast: Mel Gibson, Colin Woodell, Mishel Prada :: Writer: Greg Coolidge, Shawn

ChatGPT: changes needed in plugin.py for openai>=1.0.0

Greetings,

For recent versions (>=1.0.0) of the openai Python package, some minor changes are necessary in the ChatGPT plugin.

Please see this patch:

--- ChatGPT/plugin.py.old       2023-11-14 19:42:28.032663945 +0100
+++ ChatGPT/plugin.py   2023-11-14 19:42:58.888824298 +0100
@@ -31,7 +31,7 @@
 from supybot import utils, plugins, ircutils, callbacks
 from supybot.commands import *
 from supybot.i18n import PluginInternationalization
-import openai
+from openai import OpenAI


 _ = PluginInternationalization("ChatGPT")
@@ -44,9 +44,11 @@

     def chat(self, irc, msg, args, text):
         """Manual Call to the ChatGPT API"""
-        openai.api_key = self.registryValue("api_key")
+        client = OpenAI(
+            api_key = self.registryValue("api_key"),
+        )
         prompt = self.registryValue("prompt", msg.channel).replace("$botnick", irc.nick)
-        completion = openai.ChatCompletion.create(
+        completion = client.chat.completions.create(
             model=self.registryValue("model", msg.channel),
             messages=[
                 {"role": "system", "content": prompt},

Hope this helps.

Best regards,
Dorian

No development Branch

The repository needs a development branch for unstable versions, but these should be shared so all contributors can see, test, and edit them. In short, this repository needs a development branch for development versions to be released.

Feature request: Configuration variable to allow SpiffyTitles to override reply.withnotice

I've seen a way to submit feature requests for some repositories, but I don't see it for this one, so I'll submit it as an issue.

I have my Limnoria bot in a specific channel where the ops prefer that the bot reply in notices, because the channel is full of trolls who like to abuse the bot, but they want the URL blurbs to be reported in channel, for obvious reasons (URL blurbs are practically useless if they're only sent back to the person who already knows what the webpage is, and also I think they're the feature people want/use from my bot more than anything else, so the requested feature might be useful to more people than just me). The only way I could do this is to modify the source of SpiffyTitles. This isn't ideal, of course, and also, if there were a configuration variable for this, I wouldn't have to worry about it changing when I upgrade SpiffyTitles.

It might also be good to be able to override reply.notices only on specific channels, since I only need to do it on that one channel, but on the other hand, that's the only channel where I have reply.withnotice set to True in the first place, so it doesn't really matter, at least in my case. (Or I guess Limnoria has a built-in way to make any configuration variable channel-specific? I'm hazy on that.)

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.