MaJ
This commit is contained in:
parent
33a493ba87
commit
7168187c08
5 changed files with 6 additions and 2 deletions
BIN
.ecoplus.py.swp
BIN
.ecoplus.py.swp
Binary file not shown.
BIN
.forgejo.py.swp
BIN
.forgejo.py.swp
Binary file not shown.
|
@ -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}")
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue