added slash command for rss
This commit is contained in:
@@ -94,6 +94,14 @@ async def on_ready():
|
||||
logger.info(f'{bot.user} has connected to Discord!')
|
||||
logger.info(f"Websocket latency is {bot.latency*1000} ms")
|
||||
|
||||
@bot.slash_command()
|
||||
async def upload(ctx):
|
||||
if ctx.user.id == 345153972765720577 or ctx.user.id == 468866369782415360:
|
||||
df = rss_gen.create_df()
|
||||
rss_gen.create_48h_latest(df)
|
||||
rss_gen.create_25_recent_feed(df)
|
||||
await ctx.respond(f"Sucessfully uploaded updated RSS feed")
|
||||
|
||||
@bot.slash_command()
|
||||
async def upload(ctx):
|
||||
messagechannel = bot.get_channel(862039084683624468)
|
||||
|
||||
@@ -11,14 +11,14 @@ XML_BEGIN_RECENT = """<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"
|
||||
<description>Torfiles RSS Feed</description>
|
||||
<language>en</language>
|
||||
<ttl>5</ttl>
|
||||
<atom:link href="http://rss.torfiles.fieryeagle.org" rel="self" type="application/rss+xml" />"""
|
||||
<atom:link href="https://rss.torfiles.fieryeagle.org/recent_25.xml" rel="self" type="application/rss+xml" />"""
|
||||
|
||||
XML_BEGIN_LAST = """<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Torfiles Last 48h</title>
|
||||
<link>https://torfiles.fieryeagle.org</link>
|
||||
<description>Torfiles RSS Feed</description>
|
||||
<language>en</language>
|
||||
<ttl>5</ttl>
|
||||
<atom:link href="http://rss48h.torfiles.fieryeagle.org" rel="self" type="application/rss+xml" />"""
|
||||
<atom:link href="https://rss.torfiles.fieryeagle.org/latest_48h.xml" rel="self" type="application/rss+xml" />"""
|
||||
|
||||
XML_END = """</channel></rss>"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user