Merge branch 'main' of github.com:Enzo-Nunes/PICable
This commit is contained in:
5
main.py
5
main.py
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import discord
|
import discord
|
||||||
from sys import argv
|
from sys import argv
|
||||||
|
import PICable
|
||||||
|
|
||||||
if len(argv) != 3:
|
if len(argv) != 3:
|
||||||
print('Usage:\n\t' + argv[0] + ' <discord_token> <github_token>')
|
print('Usage:\n\t' + argv[0] + ' <discord_token> <github_token>')
|
||||||
@@ -27,10 +28,10 @@ async def on_message(message):
|
|||||||
msg : str = message.content
|
msg : str = message.content
|
||||||
parts = msg.split()
|
parts = msg.split()
|
||||||
if len(parts) != 2:
|
if len(parts) != 2:
|
||||||
await message.reply('Usage:\n\t$picker <url>')
|
await message.reply('Usage:\n\t$picker <owner> <repo>')
|
||||||
return
|
return
|
||||||
|
|
||||||
await message.reply('I\'m lost :shrug:')
|
await message.reply(PICable.PICable(parts[1], parts[2], github_token))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user