Make custom colour for Google embeds

pull/128/head
stijndcl 2022-08-29 02:01:05 +02:00
parent ea6b204cf0
commit 14e0472954
2 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ from overrides import overrides
from didier.data.embeds.base import EmbedBaseModel
from didier.data.scrapers.google import SearchData
from didier.utils.discord.colours import google_blue
__all__ = ["GoogleSearch"]
@ -36,7 +37,7 @@ class GoogleSearch(EmbedBaseModel):
if not self.data.results or self.data.status_code != HTTPStatus.OK:
return self._error_embed()
embed = discord.Embed(title="Google Search", colour=discord.Colour.blue())
embed = discord.Embed(title="Google Search", colour=google_blue())
embed.set_footer(text=self.data.result_stats or None)
# Add all results into the description

View File

@ -1,6 +1,6 @@
import discord
__all__ = ["ghent_university_blue", "ghent_university_yellow", "urban_dictionary_green"]
__all__ = ["ghent_university_blue", "ghent_university_yellow", "google_blue", "urban_dictionary_green"]
def ghent_university_blue() -> discord.Colour:
@ -11,5 +11,9 @@ def ghent_university_yellow() -> discord.Colour:
return discord.Colour.from_rgb(255, 210, 0)
def google_blue() -> discord.Colour:
return discord.Colour.from_rgb(66, 133, 244)
def urban_dictionary_green() -> discord.Colour:
return discord.Colour.from_rgb(220, 255, 0)