This commit is contained in:
attilavs2 2025-05-05 19:58:23 +02:00
parent 33a493ba87
commit 7168187c08
5 changed files with 6 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -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}")

View file

@ -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)

View file

@ -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)