From 1ee36ad4f84b7de7340aaba4e4e9653a4f97b8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B0=D0=B6=D0=B8=D0=B3=D0=B8=D0=BD=20=D0=91=D0=BE?= =?UTF-8?q?=D0=B3=D0=B4=D0=B0=D0=BD=20=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 3 Apr 2023 19:24:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B0=D0=BB=20=D0=BD=D0=B0=D1=87=D0=B0?= =?UTF-8?q?=D0=BB=D0=BE=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/bot.py | 20 ++++++++++++++++++++ source/requirements.txt | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 source/requirements.txt diff --git a/source/bot.py b/source/bot.py index e69de29..17680e2 100644 --- a/source/bot.py +++ b/source/bot.py @@ -0,0 +1,20 @@ +import discord +import gitlab + +gl = gitlab.Gitlab(url='https://gitlab.megu.one', private_token='glpat-FsbtfebnSiw1SJ8foYpu') + +intents = discord.Intents.default() +intents.message_content = True + +client = discord.Client(intents=intents) + +@client.event +async def on_message(message): + if message.author == client.user: + return + + if message.content.startswith('/issue'): + await message.channel.send(3 + 6) + + +client.run("MTA5MjQ3ODUzMTIyNjgzNjk5NA.GKB56y.LpYtwlRcUX6R2ZWe_HAZp6bAEUEBYDfMbHmX3A") \ No newline at end of file diff --git a/source/requirements.txt b/source/requirements.txt new file mode 100644 index 0000000..55ac164 --- /dev/null +++ b/source/requirements.txt @@ -0,0 +1,2 @@ +discord.py +python-gitlab \ No newline at end of file