Beispiel #1
0
def online(data: structures.OnlineStructure):
    embed = CustomEmbed(title='**Топ по количеству голосов**',
                        author=EmbedAuthor(name='Excalibur-Craft Data',
                                           icon_url=images.EX_CRAFT_LOGO),
                        thumbnail_url=images.ONLINE_THUMBNAIL,
                        color=0xdbdbdb)
    for _player in data.players:
        embed.add_field(name=f'**{_player.nickname}**', value=_player.online)

    return embed
Beispiel #2
0
def votes(data: structures.VoteStructure):
    embed = CustomEmbed(title='**Топ по количеству голосов**',
                        author=EmbedAuthor(name='Excalibur-Craft Data',
                                           icon_url=images.EX_CRAFT_LOGO),
                        thumbnail_url=images.VOTE_THUMBNAIL,
                        color=0xffb136)
    for _player in data.players:
        embed.add_field(name=f'**{_player.place} место**',
                        value=_player.nickname)

    return embed
Beispiel #3
0
def monitoring(data: structures.MonitoringStructure):
    embed = CustomEmbed(title='**Мониторинг серверов**',
                        author=EmbedAuthor(name='Excalibur-Craft Data',
                                           icon_url=images.EX_CRAFT_LOGO),
                        thumbnail_url=images.MONITORING_THUMBNAIL,
                        fields=[
                            EmbedField(name='**Общий онлайн**',
                                       value=f'{data.total_online} игроков')
                        ])
    for server in data.servers:
        embed.add_field(name=f'**{server.name}**',
                        value=f'{server.online} игроков')

    return embed