Remove CONVO and added mention

This commit is contained in:
tropii 2023-11-24 19:46:44 -05:00
parent 2ae7cbf3e9
commit 5d9dd0dc51
2 changed files with 9 additions and 21 deletions

2
bot.py
View File

@ -45,7 +45,7 @@ intents.members = True
# create the bot
class MyBot(commands.Bot):
def __init__(self):
super().__init__(command_prefix=get_server_prefix, intents = intents)
super().__init__(command_prefix=commands.when_mentioned_or(get_server_prefix), intents = intents)
self.synced = False
self.warnings = {}
self.remove_command("help")

View File

@ -28,6 +28,13 @@ class convo(commands.Cog):
async def on_ready(self):
print("Convo Online")
@commands.hybrid_command(name="convosetup", description="Sets up a conversation channel")
@commands.has_permissions(administrator=True)
@commands.check(is_enabled)
async def convosetup(self, ctx, channel: discord.TextChannel = None):
await ctx.send("API for this command is no longer active. Convo disabled until further notice")
"""
@commands.Cog.listener()
async def on_message(self, message):
client = pymongo.MongoClient(os.getenv("mongo_url"))
@ -64,26 +71,7 @@ class convo(commands.Cog):
response = requests.request("GET", url, headers=headers)
await channelll.send(response.json()['message'])
@commands.hybrid_command(name="convosetup", description="Sets up a conversation channel")
@commands.has_permissions(administrator=True)
@commands.check(is_enabled)
async def convosetup(self, ctx, channel: discord.TextChannel = None):
client = pymongo.MongoClient(os.getenv("mongo_url"))
db = client.servers
coll = db.convo
if channel == None:
channel = ctx.channel
channell = coll.find_one({"_id": {"guild_id": ctx.guild.id}, "channel": channel.id})
if channell == None:
coll.insert_one({"_id": {"guild_id": ctx.guild.id}, "channel": channel.id})
await ctx.send("Conversation channel setup!")
else:
await ctx.send("Conversation channel is already setup!")
"""
async def setup(bot):