async def info(self, ctx): ownername = await self.bot.get_user_info(owner) ownername = ownername.name modstring = "" for a_mod in mod: modname = await self.bot.get_user_info(a_mod) modname = modname.name modstring += modname + " " if not modstring: modstring = "None" users = 0 for s in self.bot.servers: users += len(s.members) now = datetime.now().date() dday = date(2018, 8, 6) result = now - dday embed = Embed(title=_("%s 정보") % self.bot.user.name, description=instructions.get(), color=0x1ef7fa) embed.set_thumbnail(url=self.bot.user.avatar_url) embed.add_field(name=_("봇 운영자"), value=ownername, inline=True) embed.add_field(name=_("봇 부운영자"), value=modstring, inline=True) embed.add_field(name=_("서버 수"), value=len(self.bot.servers), inline=True) embed.add_field(name=_("사용자 수"), value=users, inline=True) embed.add_field(name=_("접두사"), value=prefix.get(), inline=True) embed.add_field(name=_("DPSBot의 나이"), value=_("최초 공개로부터 %s일 지났습니다.") % str(result.days), inline=True) embed.set_footer(text=_("Powered by Team ttakkku")) await self.bot.send_message(ctx.message.channel, embed=embed)
async def userinfo(self, ctx): person = ctx.message.mentions[0].id person = await self.bot.get_user_info(person) name = person.name discriminator = person.discriminator avatar = person.avatar_url id = person.id embed = Embed(title="%s#%s" % (name, discriminator), description="id:%s" % (id), color=0xE0FFFF) embed.set_thumbnail(url=avatar) await self.bot.send_message(ctx.message.channel, embed=embed)
async def info(self, ctx): ownername = await self.bot.get_user_info(owner) ownername = ownername.name modstring = "" for a_mod in mod: modname = await self.bot.get_user_info(a_mod) modname = modname.name modstring += modname + " " if not modstring: modstring = "None" users = 0 for s in self.bot.servers: users += len(s.members) now = datetime.now().date() dday = date(2018, 8, 6) result = now - dday embed = Embed(title=_("%s 정보") % self.bot.user.name, description=instructions.get(), color=0x1ef7fa) embed.set_thumbnail(url=self.bot.user.avatar_url) embed.add_field(name=_("봇 운영자"), value=ownername, inline=True) embed.add_field(name=_("봇 부운영자"), value=modstring, inline=True) embed.add_field(name=_("서버 수"), value=len(self.bot.servers), inline=True) embed.add_field(name=_("사용자 수"), value=users, inline=True) embed.add_field(name=_("접두사"), value=prefix.get(), inline=True) embed.add_field(name="Bot Official site", value="https://dps0340.xyz", inline=True) embed.add_field(name="Bot Official git", value="https://github.com/dpsbot-project/DPSBot", inline=True) embed.add_field(name="Bot Official server", value="https://discordapp.com/invite/b9aEEaE", inline=True) embed.add_field( name="invite this bot", value= "https://discordapp.com/oauth2/authorize?client_id=588671532944064524&permissions=8&scope=bot", inline=True) embed.add_field(name=_("DPSBot의 나이"), value=_("최초 공개로부터 %s일 지났습니다.") % str(result.days), inline=True) embed.set_footer(text=_("DPSbot X Naesungbot")) await self.bot.send_message(ctx.message.channel, embed=embed)
async def osu(self, ctx, *user): username = '' i = 0 for word in user: i += 1 if word == user[-1] and len(user) == i: username += str(word) else: username += str(word) + ' ' api = OsuApi(osuapikey, connector=ReqConnector()) results = api.get_user(username) userid = results[0].user_id thumbnail = "https://s.ppy.sh/a/" + str(userid) embed = Embed(title="%s" % (username), description="id:%s" % (userid), color=0xE0FFFF) embed.set_thumbnail(url=thumbnail) await self.bot.send_message(ctx.message.channel, embed=embed) await self.bot.send_message(ctx.message.channel, "https://osu.ppy.sh/users/%d" % userid)