error solve

swadhinbiswas committed 2 years ago
308ee70
1 parent 8d228a8
commit 308ee70
2 files changed
+15 -5
▼GithubfetchBot/gitfunction.py
+1-3
27
27
28
28
# return response.json()
29
29
30
-x=GetGitHub.get_repo("python")
31
-pprint.pprint(x)
32
-
30
+
33
31
34
32
▼GithubfetchBot/sendwebhook.py
+14-2
27
27
language = item["language"]
28
28
description = item["description"]
29
29
link = item["html_url"]
30
+ issue = item["open_issues"]
31
+ ssh = item["ssh_url"]
32
+ giturl = item["git_url"]
33
+ icon=item["owner"]["avatar_url"]
30
34
31
35
32
- embed = Embed(title="Trending Python Repositories", color=0x00ffff,description=f"Name: {name}\nOwner: {owner}\nStars: {stars}\nLanguage: {language}\nDescription: {description}\nLink: {link}")
33
- embed.set_image(url=link)
36
+
37
+
38
+ description=f"Name: {name}\nStars: {stars}\nLanguage: {language}\nDescription: {description}\nLink: {link}\n Open Issues: {issue}\nSSH URL: {ssh}\nGit URL: {giturl}"
39
+ try:
40
+
41
+ embed = Embed(title="Trending Python Repositories", color=0x00ffff,description=description)
42
+ embed.set_thumbnail(url=link)
43
+ embed.set_author(name=owner, icon_url=icon)
44
+ except:
45
+ await webhook.send("end of erra")
34
46
35
47
36
48
await webhook.send(embed=embed)
37
49