minor tweaks

This commit is contained in:
mudkipdev
2023-05-07 14:43:24 -06:00
parent 8b5c8041ff
commit 231da5e507
3 changed files with 11 additions and 6 deletions

View File

@@ -7,7 +7,6 @@ import discord
from utils import can_publish_announcements
ANNOUNCEMENT_BUILDER_TIMEOUT = 1200
EMBED_COLOR = 0x1ABC9C
EMBED_THUMBNAIL = "https://imgur.com/MJnM3LU.png"
@@ -143,7 +142,7 @@ class Announcement:
async def get_embed(self, *, bot: commands.Bot) -> discord.Embed:
embed = discord.Embed(
color=EMBED_COLOR,
color=bot.config.embed_color,
title=self.title,
url=self.url,
description=self.description,

View File

@@ -2,8 +2,6 @@ from discord.ext import commands
import discord
from extensions.announcements import Announcement
EMBED_COLOR = 0x1ABC9C
TEMPLATES: dict[str, Announcement] = {
"isc": Announcement(title="Inside Star Citizen | [topic] - [subtopic]"),
"scl": Announcement(title="Star Citizen Live | [topic] - [subtopic]"),
@@ -90,13 +88,17 @@ class TemplatesCog(commands.Cog, name="Templates"):
@commands.command(name="previews", brief="Shows all the possible ping previews.")
async def ping_previews(self, ctx: commands.Context) -> None:
await ctx.reply(
embed=discord.Embed(color=EMBED_COLOR, description=PING_PREVIEWS),
embed=discord.Embed(
color=self.bot.config.embed_color, description=PING_PREVIEWS
),
allowed_mentions=discord.AllowedMentions.none(),
)
@commands.command(brief="Shows all the channel IDs for announcements.")
async def channels(self, ctx: commands.Context) -> None:
await ctx.reply(embed=discord.Embed(color=EMBED_COLOR, description=CHANNELS))
await ctx.reply(
embed=discord.Embed(color=self.bot.config.embed_color, description=CHANNELS)
)
async def setup(bot: commands.Bot) -> None:

View File

@@ -5,6 +5,10 @@ class Config:
def __init__(self, config: dict):
self.config = config
@property
def embed_color(self) -> int:
return 0x1ABC9C
@property
def debug(self) -> bool:
return self.config.get("debug", False)