File tree 2 files changed +13
-2
lines changed 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,15 @@ async def github_command(ctx):
59
59
async def projects_command (ctx ):
60
60
payload = requests .get ('https://api.github.com/users/hackbacc/repos' ).text
61
61
for project in json .loads (payload ):
62
- await ctx .send (project ['full_name' ] + " - " + project ['html_url' ] + " - " + str (project ['description' ]))
62
+ await ctx .send (project ['full_name' ] + " -\n " + project ['html_url' ] + " - " + str (project ['description' ]))
63
63
64
+ @bot .command (name = 'cmds' , aliases = ['c' ])
65
+ async def cmds_command (ctx ):
66
+ cmds = []
67
+ for f in funcs :
68
+ if f .endswith ('_command' ):
69
+ cmds .append ("!" + f .split ('_' )[0 ])
70
+ await ctx .send ('available cmds are - ' + ' ' .join (cmds ))
71
+
72
+ funcs = locals ().keys ()
64
73
bot .run ()
Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ def do_POST(self):
24
24
25
25
body = json .loads (body )
26
26
if body ['repository' ]['full_name' ] == 'hackbacc/hackbot' :
27
+ print ('reset' )
27
28
pass
28
29
29
30
self .wfile .write (response .getvalue ())
30
31
31
32
32
- httpd = HTTPServer (('localhost' , 6006 ), SimpleHTTPRequestHandler )
33
+ # httpd = HTTPServer(('localhost', 6006), SimpleHTTPRequestHandler)
34
+ httpd = HTTPServer (('0.0.0.0' , 6006 ), SimpleHTTPRequestHandler )
33
35
httpd .serve_forever ()
34
36
You can’t perform that action at this time.
0 commit comments