async def weather(self, ctx, *args): if len(args) == 0: await ctx.send("Please input the city after commands") try: bav = todo.urlify(' '.join(args)) t = requests.get(wea + str(bav) + k).json()["respon"]["tempat"] c = requests.get(wea + str(bav) + k).json()["respon"]["cuaca"] d = requests.get(wea + str(bav) + k).json()["respon"]["deskripsi"] s = requests.get(wea + str(bav) + k).json()["respon"]["suhu"] ke = requests.get(wea + str(bav) + k).json()["respon"]["kelembapan"] ud = requests.get(wea + str(bav) + k).json()["respon"]["udara"] an = requests.get(wea + str(bav) + k).json()["respon"]["angin"] memew = discord.Embed( color=discord.Colour.from_rgb(0, 250, 154), description= "<a:dcloadv10:698837945423233075> Please waittinngg....") embed = discord.Embed( color=discord.Colour.from_rgb(0, 250, 154), title="WEATHER", description= f"Location : **{t}**\nWeather : **{c}**\nDescription : **{d}**\nTemperature : **{s}**\nHumidity : **{ke}**\nAir : **{ud}**\nWind : **{an}**" ) msg = await ctx.send(embed=memew) await asyncio.sleep(5) await msg.edit(embed=embed) except Exception: await ctx.send(f"")
async def country(self, ctx, *args): if len(args) == 0: await ctx.send("***`Todo.country [country]`***") else: y = todo.urlify(' '.join(args)) n = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["name"] adc = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["alpha2Code"] c = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["capital"] r = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["region"] sr = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["subregion"] p = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["population"] t = requests.get('https://restcountries.eu/rest/v2/name/' + str(y)).json()[0]["timezones"] embed = discord.Embed( title=n, color=discord.Color.blue(), description= f"Name : **{n}**\nAliases : **{adc}**\nCapital : **{c}**\nRegion : **{r}**\nSubregion : **{sr}**\nPopulation : **{p}**" ) embed.set_thumbnail( url= "https://cdn.discordapp.com/attachments/730294436701012029/735080496656285746/unnamed.gif" ) await ctx.send(embed=embed)
async def ss(self, ctx, *args): try: o = todo.urlify(' '.join(args)) yeyy = say + str(o) + '&thumb_width=600&quality=80' await ctx.send( file=discord.File(Painter.urltoimage(yeyy), 'screenshoot.png')) except Exception as e: await ctx.send(f"```{e}```")
async def b64decode(self, ctx, *args): try: oy = todo.urlify(' '.join(args)) ip = requests.get('http://nezumiyuiz.glitch.me/api/base64?text=' + str(oy)).json()["base64"]["decode"] await ctx.send(ip) except Exception as e: await ctx.send(f"```ERROR ||{e}||```")
async def achiv(ctx, *args): async with ctx.message.channel.typing(): if len(args) == 0: await ctx.send("Input the Text!") else: capt = todo.urlify(' '.join(args)) data = Painter.urltoimage( 'https://api.alexflipnote.dev/achievement?text=' + str(capt)) await ctx.send(file=discord.File(data, 'credittoalex.png'))
async def fancy(self, ctx, *args): if len(args) == 0: await ctx.send("Input text!") if len(' '.join(list(args))) > 100: await ctx.send("Yea spam, no bish leave") else: y = todo.urlify(' '.join(args)) o = requests.get('https://nezumiyuiz.glitch.me/api/fancy?text=' + str(y)).json()["fancy"] await ctx.send(o)
async def reverse(self, ctx, *args): if len(args) == 0: await ctx.send("Please input text for reversed") if len(' '.join(list(args))) > 100: await ctx.send("Yea spam, no bish leave") else: u = todo.urlify(' '.join(args)) o = requests.get('https://nezumiyuiz.glitch.me/api/reverse?text=' + str(u)).json()["reverse"] await ctx.send(o)
async def aes(self, ctx, *args): if len(args) == 0: await ctx.send("Please input the text!") if len(' '.join(list(args))) > 100: await ctx.send("Yea spam, no bish leave") else: y = todo.urlify(' '.join(args)) u = requests.get( 'https://nezumiyuiz.glitch.me/api/aesthetic?text=' + str(y)).json()["aesthetic"] await ctx.send(u)
async def textimg(ctx, *args): if len(args) == 0: await ctx.send("Input the text!") if len(' '.join(list(args))) > 50: await ctx.send("The word is limit") else: async with ctx.message.channel.typing(): txt = todo.urlify(' '.join(args)) data = Painter.urltoimage( 'https://useless-api--vierofernando.repl.co/texttoimage?text=' + str(txt)) await ctx.send(file=discord.File(data, 'viero.png'))
async def notstonk(self, ctx, *args): if len(args) == 0: await ctx.send("Input text tolol") try: join = todo.urlify(' '.join(args)) y = 'https://nezumiyuiz.glitch.me/api/notstonks?avatar=' + str( ctx.author.avatar_url).replace('.webp', '.png') + '&text=' + str(join) await ctx.send( file=discord.File(Painter.urltoimage(y), 'bangpeguigans.png')) except Exception as e: await ctx.send(f"```{e}```")
async def twitter(self, ctx, *args): if len(args) == 0: await ctx.send( "Couldnt find someting, pls input twitter user after commands") try: z = todo.urlify(' '.join(args)) n = requests.get(twit + str(z) + memek).json()["result"]["name"] sn = requests.get(twit + str(z) + memek).json()["result"]["screen_name"] d = requests.get(twit + str(z) + memek).json()["result"]["description"] pp = requests.get(twit + str(z) + memek).json()["result"]["profilepicture"] pb = requests.get(twit + str(z) + memek).json()["result"]["profilebanner"] f = requests.get(twit + str(z) + memek).json()["result"]["followers"] fol = requests.get(twit + str(z) + memek).json()["result"]["following"] li = requests.get(twit + str(z) + memek).json()["result"]["likes"] tw = requests.get(twit + str(z) + memek).json()["result"]["tweet"] joi = requests.get(twit + str(z) + memek).json()["result"]["joined"] embed = discord.Embed( color=discord.Colour.from_rgb(0, 255, 255), description= f"Tag : **{sn}**\nBanner : **[Link]({pb})**\nFollowers : **{f}**\nFollowing : **{fol}**\nLikes : **{li}**\nTweet : **{tw}**\nJoined : **{joi}**\nBio : *{d}*" ) embed.set_author( name=n or "-", icon_url= "https://cdn.discordapp.com/attachments/730367960572493828/738343583861702666/124021.png" ) embed.set_thumbnail(url=pp) pv = discord.Embed( color=discord.Color.blue(), description= "<a:dcloadv10:698837945423233075> Please waitting, getting data...." ) ty = await ctx.send(embed=pv) await asyncio.sleep(6) await ty.edit(embed=embed) except Exception: await ctx.send(f"")
async def joox(self, ctx, *args): if len(args) == 0: await ctx.send("Pls input song after commands") try: o = todo.urlify(' '.join(args)) t = requests.get(joox + str(o)).json()[0]["judul"] u = requests.get(joox + str(o)).json()[0]["songid"] paa = requests.get(joox + str(o)).json()[0]["penyanyi"] i = requests.get(joox + str(o)).json()[0]["album"] embed = discord.Embed( color=discord.Colour.from_rgb(0, 255, 255), description= f"Song ID : **{u}**\nArtist : **{paa}**\nAlbum : **{i}**") embed.set_author( name=t, icon_url= "https://cdn.discordapp.com/attachments/730367960572493828/738319347390349403/JOOX.png" ) await ctx.send(embed=embed) except Exception: await ctx.send(f"")
async def covid(ctx, *args): if len(args) == 0: cases = requests.get( 'https://disease.sh/v3/covid-19/all').json()["cases"] today = requests.get( 'https://disease.sh/v3/covid-19/all').json()["todayCases"] death = requests.get( 'https://disease.sh/v3/covid-19/all').json()["deaths"] dtoday = requests.get( 'https://disease.sh/v3/covid-19/all').json()["todayDeaths"] rec = requests.get( 'https://disease.sh/v3/covid-19/all').json()["recovered"] trec = requests.get( 'https://disease.sh/v3/covid-19/all').json()["todayRecovered"] act = requests.get( 'https://disease.sh/v3/covid-19/all').json()["active"] cri = requests.get( 'https://disease.sh/v3/covid-19/all').json()["critical"] popu = requests.get( 'https://disease.sh/v3/covid-19/all').json()["population"] embed = discord.Embed() embed.set_author( name="Covid Stats", icon_url= "https://cdn.discordapp.com/attachments/721753102822277130/733695614843617350/691d9ddf630b9658d959075881715405.png" ) embed.add_field(name='Total Cases', value=f'**```{cases} cases```**') embed.add_field(name="Today Cases", value=f"**```{today}```**") embed.add_field(name="Total Deaths", value=f"**```{death}```**") embed.add_field(name="Deaths Today", value=f"**```{dtoday}```**") embed.add_field(name="Recovered Total", value=f"**```{trec}```**") embed.add_field(name="Active", value=f"**```{act}```**") embed.add_field(name="Critical", value=f"**```{cri}```**") embed.add_field(name="Population", value=f"**```{popu}```**") embed.add_field(name="Recovered Today", value=f"**```{rec}```**") embed.color = discord.Color.blue() embed.set_thumbnail( url= "https://cdn.discordapp.com/attachments/721753102822277130/733695614843617350/691d9ddf630b9658d959075881715405.png" ) await ctx.send(embed=embed) try: cav = todo.urlify(' '.join(args)) ca = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["cases"] tca = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["todayCases"] de = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["deaths"] tre = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["todayRecovered"] re = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["recovered"] po = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["population"] tde = requests.get(f'https://disease.sh/v3/covid-19/countries/' + str(cav)).json()["todayDeaths"] embed = discord.Embed(color=discord.Color.blue()) embed.add_field(name="Population ", value=f"**```{po}```**") embed.add_field(name="Cases", value=f"**```{ca}```**") embed.add_field(name="Today Cases", value=f"**```{tca}```**") embed.add_field(name="Death", value=f"**```{de}```**") embed.add_field(name="Today Death", value=f"**```{tde}```**") embed.add_field(name="Today Recovered", value=f"**```{tre}```**") embed.add_field(name="Recovered", value=f"**```{re}```**") embed.set_thumbnail( url= "https://cdn.discordapp.com/attachments/721753102822277130/733695614843617350/691d9ddf630b9658d959075881715405.png" ) await ctx.send(embed=embed) except Exception: await ctx.send( "Cant find country on list or there is no cases on that country")
async def aessc(self, ctx, *args): y = todo.urlify(' '.join(args)) u = requests.get('https://nezumiyuiz.glitch.me/api/aesthetic?text=' + ctx.channel).json()["aesthetic"] await ctx.send(u)