Exemplo n.º 1
0
    def __init__(self, uptime, python_version, discord_version, stars, forks,
                 issues, connected_servers, total_members, pc, cpu_use, ram,
                 ram_tot, hdd, hdd_tot):
        super().__init__(color=Color.info)

        uptime = strftime('%H hours %M mins %S secs', gmtime(uptime))

        self.set_author(name=Reply.github_repo(stars, forks, issues),
                        url=Link.github_repo,
                        icon_url=Link.github_icon)
        self.add_field(
            name='🤖 Бот:',
            value=
            f'**Uptime**: {uptime}\n**Сървъри**: {connected_servers}\n**Потребители**: {total_members}'
        )
        self.add_field(name=Text.host,
                       value=Reply.system_info(pc.node, pc.system, pc.release,
                                               cpu_use, ram, ram_tot, hdd,
                                               hdd_tot),
                       inline=False)
        self.add_field(name=Text.used_technologies,
                       value=Reply.used_tech(python_version, discord_version),
                       inline=False)
        self.add_field(name=Text.author, value=Text.me, inline=False)
        self.add_field(name=Text.top_contributors,
                       value=Text.contributors,
                       inline=False)
Exemplo n.º 2
0
    def __init__(self, python_version, discord_version, stars, forks, issues,
                 connected_servers, total_members, pc, cpu_use, ram):
        super().__init__(color=Color.info)

        self.set_author(name=Reply.github_repo(stars, forks, issues),
                        url=Link.github_repo,
                        icon_url=Link.github_icon)
        self.add_field(name=Text.discord_servers,
                       value=str(connected_servers),
                       inline=True)
        self.add_field(name=Text.users, value=str(total_members), inline=True)
        self.add_field(name=Text.host,
                       value=Reply.system_info(pc.node, pc.system, pc.release,
                                               cpu_use, ram),
                       inline=False)
        self.add_field(name=Text.used_technologies,
                       value=Reply.used_tech(python_version, discord_version),
                       inline=False)
        self.add_field(name=Text.author, value=Text.me, inline=False)
        self.add_field(name=Text.top_contributors,
                       value=Text.contributors,
                       inline=False)