mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Now using hyperlinks in Queue and adding support message as random string
This commit is contained in:
@@ -24,6 +24,10 @@ class VConfigs(Singleton):
|
||||
self.COMMANDS_PATH = f'{Folder().rootFolder}{self.COMMANDS_FOLDER_NAME}'
|
||||
self.VC_TIMEOUT = 300
|
||||
|
||||
self.CHANCE_SHOW_PROJECT = 15
|
||||
self.PROJECT_URL = 'https://github.com/RafaelSolVargas/Vulkan'
|
||||
self.SUPPORTING_ICON = 'https://i.pinimg.com/originals/d6/05/b4/d605b4f8c5d1c6ae20dc353ef9f091bd.png'
|
||||
|
||||
self.MAX_PLAYLIST_LENGTH = 50
|
||||
self.MAX_PLAYLIST_FORCED_LENGTH = 5
|
||||
self.MAX_SONGS_IN_PAGE = 10
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from random import random
|
||||
from Config.Messages import Messages
|
||||
from Config.Exceptions import VulkanError
|
||||
from discord import Embed
|
||||
@@ -12,6 +13,13 @@ class VEmbeds:
|
||||
self.__messages = Messages()
|
||||
self.__colors = VColors()
|
||||
|
||||
def __willShowProject(self) -> bool:
|
||||
return (random() * 100 < self.__config.CHANCE_SHOW_PROJECT)
|
||||
|
||||
def __addFooterContent(self, embed: Embed) -> Embed:
|
||||
footerText = f'\u200b Please support this project by leaving a star: {self.__config.PROJECT_URL}'
|
||||
return embed.set_footer(text=footerText, icon_url=self.__config.SUPPORTING_ICON)
|
||||
|
||||
def ONE_SONG_LOOPING(self, info: dict) -> Embed:
|
||||
title = self.__messages.ONE_SONG_LOOPING
|
||||
return self.SONG_INFO(info, title)
|
||||
@@ -113,6 +121,8 @@ class VEmbeds:
|
||||
value=position,
|
||||
inline=True)
|
||||
|
||||
if self.__willShowProject():
|
||||
embedvc = self.__addFooterContent(embedvc)
|
||||
return embedvc
|
||||
|
||||
def SONG_MOVED(self, song_name: str, pos1: int, pos2: int) -> Embed:
|
||||
@@ -340,6 +350,9 @@ class VEmbeds:
|
||||
description=description,
|
||||
colour=self.__colors.BLUE
|
||||
)
|
||||
|
||||
if self.__willShowProject():
|
||||
embed = self.__addFooterContent(embed)
|
||||
return embed
|
||||
|
||||
def INVITE(self, bot_id: str) -> Embed:
|
||||
|
||||
Reference in New Issue
Block a user