diff --git a/.ecoplus.py.swp b/.ecoplus.py.swp deleted file mode 100644 index 36cd649..0000000 Binary files a/.ecoplus.py.swp and /dev/null differ diff --git a/.forgejo.py.swp b/.forgejo.py.swp deleted file mode 100644 index e76cdf8..0000000 Binary files a/.forgejo.py.swp and /dev/null differ diff --git a/ecoplus.py b/ecoplus.py index a91f1cb..49bef8c 100644 --- a/ecoplus.py +++ b/ecoplus.py @@ -25,7 +25,7 @@ interface.client = client import forgejo -database = sqlite3.connect("bdd.db") +database = sqlite3.connect(sys.argv[2]) cursor = database.cursor() try: @@ -166,7 +166,7 @@ commentaires_zizi = [ async def zizi(message): id = message.author.id - size = random.randint(0,21) + size = random.randint(0,10) + random.randint(0,11) comment = random.choice(commentaires_zizi[size]) await message.channel.send(f"<@{id}>, votre chibre fait **{size} cm**. {comment}") diff --git a/forgejo.py b/forgejo.py index da5e719..4c4e7b7 100644 --- a/forgejo.py +++ b/forgejo.py @@ -42,6 +42,7 @@ def main(): data = request.json event = request.headers['X-Gitea-Event'] msg = None + print("received event") if data["repository"]["private"] or data["repository"]["mirror"]: return "IGN" @@ -184,3 +185,5 @@ def main(): return "ACK" +if __name__ == "__main__": + app.run(port=5000) diff --git a/interface.py b/interface.py index 8fbc768..5fcee72 100644 --- a/interface.py +++ b/interface.py @@ -1,6 +1,7 @@ client = 0 async def forgejo_send_message(msg:str): + print(msg) try: guild = client.get_guild(1157767629738618941) chan = guild.get_channel(1344400105821831209)