trying to fix stuff
This commit is contained in:
@@ -1,24 +1,4 @@
|
|||||||
from .reactquote import ReactQuote
|
from .reactquote import ReactQuote
|
||||||
from redbot.core.utils import fileIO
|
|
||||||
import os
|
|
||||||
|
|
||||||
def check_folder():
|
|
||||||
if not os.path.exists("data/reactquote"):
|
|
||||||
print("Creating data/reactquote folder...")
|
|
||||||
os.makedirs("data/reactquote")
|
|
||||||
|
|
||||||
|
|
||||||
def check_file(self):
|
|
||||||
quotes = {}
|
|
||||||
|
|
||||||
f = "data/reactquote/reactquote.json"
|
|
||||||
if not fileIO(f, "check"):
|
|
||||||
print("Creating default reactquote's reactquote.json...")
|
|
||||||
fileIO(f, "save", quotes)
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
check_folder()
|
bot.add_cog(ReactQuote(bot))
|
||||||
check_file()
|
|
||||||
n = ReactQuote(bot)
|
|
||||||
bot.add_cog(n)
|
|
||||||
@@ -1,15 +1,10 @@
|
|||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core.utils import fileIO
|
|
||||||
from __main__ import send_cmd_help
|
|
||||||
import os
|
|
||||||
from random import choice as randchoice
|
|
||||||
|
|
||||||
class ReactQuote(commands.Cog):
|
class ReactQuote(commands.Cog):
|
||||||
"""Cog to store quotes by reacting with speech bubble"""
|
"""Cog to store quotes by reacting with speech bubble"""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.quotes = fileIO("data/quotes/quotes.json", "load")
|
|
||||||
|
|
||||||
def _wrapQuote(self, msg):
|
def _wrapQuote(self, msg):
|
||||||
return msg
|
return msg
|
||||||
@@ -19,8 +14,3 @@ class ReactQuote(commands.Cog):
|
|||||||
"""TestCommand"""
|
"""TestCommand"""
|
||||||
# Your code will go here
|
# Your code will go here
|
||||||
await ctx.send("I can do stuff, really!")
|
await ctx.send("I can do stuff, really!")
|
||||||
|
|
||||||
@commands.command()
|
|
||||||
async def addquote(self, *message):
|
|
||||||
"""Manually Add Quote"""
|
|
||||||
self.bot.say(message)
|
|
||||||
Reference in New Issue
Block a user