From 573d34813952525ee661f3bf924e0f5810c09d72 Mon Sep 17 00:00:00 2001 From: tommy aka doge <59783653+dowoge@users.noreply.github.com> Date: Mon, 10 Oct 2022 23:37:06 -0400 Subject: [PATCH] leave server command --- src/modules/commands/restart.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/commands/restart.lua b/src/modules/commands/restart.lua index 6d4da16..3023d04 100644 --- a/src/modules/commands/restart.lua +++ b/src/modules/commands/restart.lua @@ -10,4 +10,13 @@ commands:Add('restart',{},"restart bot [dev]", function(t) io.open('restart.txt','w+'):write(t.message.guild.id..','..t.message.channel.id..','..t.message.id):close() os.execute('luvit ./src/main.lua') end +end) +commands:Add('leave',{},'leave',function(t) + if t.message.author==t.t[1].owner then + t.message:delete() + local left = t.message.guild:leave() + if left then + print('left') + end + end end) \ No newline at end of file