From b7ad0bcd75f48bea52b74cd3dcc3f5a18615e8b1 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Sun, 5 May 2024 02:57:53 +0100 Subject: [PATCH] Allow configuring the starboard name --- config.example.toml | 1 + src/cogs/starboard.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.example.toml b/config.example.toml index bb3a32a..400b59e 100644 --- a/config.example.toml +++ b/config.example.toml @@ -87,3 +87,4 @@ ip_servers = [ enabled = false # disables starboard entirely emoji = "⭐" # the emoji to use. Defaults to the plain star. whitelist = [994710566612500550] # An array of server IDs to whitelist. Omitted means all servers. +channel_name = "starboard" # the channel name to search for. Globally, not per-server. diff --git a/src/cogs/starboard.py b/src/cogs/starboard.py index 75b71cd..65bb331 100644 --- a/src/cogs/starboard.py +++ b/src/cogs/starboard.py @@ -133,7 +133,7 @@ class Starboard(commands.Cog): guild: discord.Guild = self.bot.get_guild(payload.guild_id) starboard_channel: discord.TextChannel | None = discord.utils.get( guild.text_channels, - name="starboard" + name=self.config.get("channel_name", "starboard") ) if not starboard_channel: self.log.warning("Could not find starboard channel in %s (%d)", guild, guild.id)