Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix adding and sending web rss feed #257

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/rss/langs/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ en:
web-help: "To search for an rss feed from any website, just enter the url of the rss/atom feed as a parameter. If the feed is valid, I will return the last article posted on this site"
web-invalid: "Oops, this url address is invalid :confused:"
yt: "YouTube"
yt-default-flow: "{logo} | New vidéo from {author}: **{title}**\nPublished on {date}\nLink: {link}\n{mentions}"
yt-form-last: "{logo} | ere is the last video of {author}:\n{title}\nPublished on {date}\nLink: {url}"
yt-default-flow: "{logo} | New video from {author}: **{title}**\nPublished on {date}\nLink: {link}\n{mentions}"
yt-form-last: "{logo} | Here is the last video of {author}:\n{title}\nPublished on {date}\nLink: {url}"
yt-help: "To search for a youtube channel, you need to enter the id of this channel. You will find it at the end of the url of the channel, it can be either the name or a random sequence of characters"
4 changes: 2 additions & 2 deletions plugins/rss/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
self.table = "rss_flows"

# launch rss loop
self.loop_child.change_interval(

Check failure on line 56 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L56

Method 'loop_child' has no 'change_interval' member (no-member, E1101)
minutes=self.time_loop
) # pylint: disable=no-member
self.loop_child.start() # pylint: disable=no-member
Expand Down Expand Up @@ -322,7 +322,7 @@
)
self.logger.info(
"RSS feed added into server %i (%s - %i)",
ctx.guild.ig,
ctx.guild.id,
link,
feed_id,
)
Expand Down Expand Up @@ -626,7 +626,7 @@
id_list.append(str(roles.id))
name_list.append(roles.name)
except (
BaseException

Check failure on line 629 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L629

Catching too general exception BaseException (broad-exception-caught, W0718)
): # pylint: disable=broad-exception-caught
await ctx.send(err)
id_list = []
Expand Down Expand Up @@ -766,8 +766,8 @@
ctx,
await self.bot._(ctx.guild.id, "rss.choose-mentions-1"),
)
except (

Check failure on line 769 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L769

Unused variable 'exc' (unused-variable, W0612)
Exception

Check failure on line 770 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L770

Catching too general exception Exception (broad-exception-caught, W0718)
) as exc: # pylint: disable=broad-exception-caught, unused-variable
flow = []
if flow is None:
Expand All @@ -775,7 +775,7 @@
if len(flow) == 0:
await ctx.send(await self.bot._(ctx.guild, "rss.fail-add"))
await self.bot.get_cog("Errors").on_error(
exc, ctx

Check failure on line 778 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L778

Using variable 'exc' before assignment (used-before-assignment, E0601)
) # pylint: disable=used-before-assignment
return
flow = flow[0]
Expand Down Expand Up @@ -866,7 +866,7 @@

def check(msg):
try:
_ = commands.core._convert_to_bool(

Check failure on line 869 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L869

Access to a protected member _convert_to_bool of a client class (protected-access, W0212)

Check failure on line 869 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L869

Module 'discord.ext.commands.core' has no '_convert_to_bool' member (no-member, E1101)
msg.content
) # pylint: disable=protected-access, no-member
except BaseException: # pylint: disable=broad-exception-caught
Expand All @@ -879,7 +879,7 @@
return await ctx.send(
await self.bot._(ctx.guild.id, "rss.too-long")
)
value = commands.core._convert_to_bool(

Check failure on line 882 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L882

Access to a protected member _convert_to_bool of a client class (protected-access, W0212)

Check failure on line 882 in plugins/rss/rss.py

View workflow job for this annotation

GitHub Actions / Pylint

plugins/rss/rss.py#L882

Module 'discord.ext.commands.core' has no '_convert_to_bool' member (no-member, E1101)
msg.content
) # pylint: disable=protected-access, no-member
if value is not None and value != flow["use_embed"]:
Expand Down Expand Up @@ -1524,7 +1524,7 @@
flow["channel"],
)
return False
obj.format = flow["structure"]
obj.message_format = flow["structure"]
obj.embed = bool(flow["use_embed"])
if obj.embed:
obj.fill_embed_data(flow)
Expand Down
Loading