Allow configuring the starboard name
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s

This commit is contained in:
Nexus 2024-05-05 02:57:53 +01:00
parent 0661656a22
commit b7ad0bcd75
Signed by: nex
GPG key ID: 0FA334385D0B689F
2 changed files with 2 additions and 1 deletions

View file

@ -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.

View file

@ -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)