Fix the format breaking the match print again
This commit is contained in:
parent
d3cdec3965
commit
d856b74d1c
2 changed files with 6 additions and 6 deletions
|
@ -7,7 +7,7 @@ from discord import app_commands
|
||||||
from discord.ext import commands, tasks
|
from discord.ext import commands, tasks
|
||||||
from datetime import datetime, timedelta, time
|
from datetime import datetime, timedelta, time
|
||||||
|
|
||||||
import match_button
|
import cogs.match_button as match_button
|
||||||
import matching
|
import matching
|
||||||
from state import State, save_to_file, AuthScope
|
from state import State, save_to_file, AuthScope
|
||||||
import util
|
import util
|
||||||
|
@ -25,6 +25,7 @@ class MatchyCog(commands.Cog):
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
"""Bot is ready and connected"""
|
"""Bot is ready and connected"""
|
||||||
self.run_hourly_tasks.start()
|
self.run_hourly_tasks.start()
|
||||||
|
self.bot.add_dynamic_items(match_button.DynamicGroupButton)
|
||||||
activity = discord.Game("/join")
|
activity = discord.Game("/join")
|
||||||
await self.bot.change_presence(status=discord.Status.online, activity=activity)
|
await self.bot.change_presence(status=discord.Status.online, activity=activity)
|
||||||
logger.info("Bot is up and ready!")
|
logger.info("Bot is up and ready!")
|
||||||
|
@ -79,7 +80,8 @@ class MatchyCog(commands.Cog):
|
||||||
logger.info("Handling /list command in %s %s from %s",
|
logger.info("Handling /list command in %s %s from %s",
|
||||||
interaction.guild.name, interaction.channel, interaction.user.name)
|
interaction.guild.name, interaction.channel, interaction.user.name)
|
||||||
|
|
||||||
matchees = matching.get_matchees_in_channel(self.state, interaction.channel)
|
matchees = matching.get_matchees_in_channel(
|
||||||
|
self.state, interaction.channel)
|
||||||
mentions = [m.mention for m in matchees]
|
mentions = [m.mention for m in matchees]
|
||||||
msg = "Current matchees in this channel:\n" + \
|
msg = "Current matchees in this channel:\n" + \
|
||||||
f"{util.format_list(mentions)}"
|
f"{util.format_list(mentions)}"
|
||||||
|
@ -186,7 +188,7 @@ class MatchyCog(commands.Cog):
|
||||||
else:
|
else:
|
||||||
# Let a non-matcher know why they don't have the button
|
# Let a non-matcher know why they don't have the button
|
||||||
msg += f"\n\nYou'll need the {AuthScope.MATCHER}"
|
msg += f"\n\nYou'll need the {AuthScope.MATCHER}"
|
||||||
+ " scope to post this to the channel, sorry!"
|
msg += " scope to post this to the channel, sorry!"
|
||||||
|
|
||||||
await interaction.response.send_message(msg, ephemeral=True, silent=True, view=view)
|
await interaction.response.send_message(msg, ephemeral=True, silent=True, view=view)
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ bot = commands.Bot(command_prefix='$',
|
||||||
async def setup_hook():
|
async def setup_hook():
|
||||||
await bot.add_cog(MatchyCog(bot, State))
|
await bot.add_cog(MatchyCog(bot, State))
|
||||||
await bot.add_cog(OwnerCog(bot))
|
await bot.add_cog(OwnerCog(bot))
|
||||||
# TODO: This line feels like it should be in the cog?
|
|
||||||
bot.add_dynamic_items(match_button.DynamicGroupButton)
|
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
|
|
Loading…
Add table
Reference in a new issue