From 54ed97fcec46c758ea4922dd6155e0d03e432499 Mon Sep 17 00:00:00 2001 From: phixxy Date: Mon, 10 Jul 2023 17:17:28 -0700 Subject: [PATCH] Added suggest_blog command --- sparkytron3000.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sparkytron3000.py b/sparkytron3000.py index 0270303..4638e68 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -646,6 +646,17 @@ async def rsgp(ctx, amount): cost = (int(amount) * cost_per_bil / 1000000000) output = str(amount) + ' rsgp would cost: $' + str(cost) await ctx.send(output) + +@bot.command() +async def suggest_blog(ctx, *args): + message = ' '.join(args) + if '\n' in message: + await ctx.send("Send only one topic at a time.") + return + else: + blogpost_file = "databases/blog_topics.txt" + with open(blogpost_file, 'a') as f: + f.writelines(message) @bot.command() async def blog(ctx):