From f285294c7c62e20d50da51c3759ef6e622a6445f Mon Sep 17 00:00:00 2001 From: Yessiest Date: Thu, 2 Dec 2021 19:31:31 +0400 Subject: [PATCH] goddamnit --- libraries/.air.lua.swp | Bin 16384 -> 0 bytes plugins/roledefaults/init.lua | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+) delete mode 100644 libraries/.air.lua.swp diff --git a/libraries/.air.lua.swp b/libraries/.air.lua.swp deleted file mode 100644 index 8395dc9eaaca6f8f702d5382c046c2c69fe8d20f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3duSX*9LLADK5JF1kE*qdTTk!I-6d^l(P(OGsglxQ+qC`XE)AQzNwUpm_t@P_ z8d4ws)(2>*QvWF}NX3FEXb~!+NPVCp3W9&PV9^Q%K|~ZE-+ArrZPGj>@d0!2>D|rF z%n{HPGty{bRzwYpAUUJ7pNG<)%zu>_dnHZgDT&j zx~{&OH=}@2z$jo8FbWt2i~>dhqkvJsC}0#Y3K#|cg9_MHLbk%MoqPiT=l?qYKXWZ1 zPk<4y9XtRo1K(Xk$Q$4wcp8Mj2OfABtOX0fH%kaP49egka38n}tN=HIb5|2`3XFpd z;4W}GxC$%)zbz)@Q*Z?Ig0B;;%GE_e$Z122Jt zpdYk@->)F#JopNH0#1V0z;Q4R9tAgm1>pSUgq#6ifRDg?;6<<(tN|;*60ivTco`wz zgR|fyH~_YQbznJI3JCb+Qq%<>gJ;2hz(5b!3O0iR_z-T{vR2b2IG_iiwkFG`tL%@K-Mz@mEKQOgqF{8|*2 zJbRe+&<qOd(UqW=30b9c8O*S^56DSBV_o%knOG z|FM~dA(}x?RvgKaFjf7BB`bZMyHc@hkuqH_b4%Qu3_!O;PqCN$a|>OCo~Lxb zY-Nju(w=g;C)eaXw>FpFD{-|qf6LQJ9d!MQ?P}!^{rF=DIaw%8wZ)}&Fc9YXAdAX* z)aQT6Q?rARp(GwYsahVjhwZ2`n6J1F^P>Df-EphvGKU$8E-|?HHy+u3+YOm0&==xM zQBY@jHPTK$jeM^@+{c2fQ*9RpvQ{=zZON7PWU4*)+-c=<)b^^VCjGd0wRV?z*&JO@ zSGCb-ka@6PvYe{Lr%W6S_g6TZ7tW~(Kb^PrkOiVX{Nya> zr@}MdChglqZ4+x`l#zK3xXb#!>*OFBSVmT<}l-T10ARQmJU>vCL-+;t>!RPX=0vZ4SZMLBr#$6=X9K+ED_}n)S1H= zdH1u5aEjYy2BO7X)~1&vTC)kV08$Quv82X)DYS#_~fEm6c1Lp=&q z?Oc1m<5jbkxbN&_`}FP0$~BCrs>$E~CUuijm$U)-#Ec8`v3;~nJ)&BhA5>z_%H}h> zDXOlwI^NK%hM}SL!~vPnlOTSWsxWi<$-5`5VLMH#*rd&5TBZbQJi}+LO_UhN)DwJu zpOVvPv)gwnOii7CO`MU06VuO}u*NEm?eiH3_y0}Hz_@KIgg@BC)PQ)Jt7$W?UJiI(TFNXZp>Ge$%|?ul!}GwP=16u9<9OCFw0HlXw?^OC%4iUFndV#4f_FK1zS6j z8qi@U6i$n7(NldGTf!6@`9sB`g|w(xM4_kw4^c$fJ|rO#s}|+ag4_w<+sU*83vRwy z+{o3NLzQ+^CFM*kAjPX$J*h}C`Wi`Ad7r z$C`)|-RTIA(2}WyHC31KM!4!*=2jQ!9Nx-~<>tAi_Q=&%y6z!qt}(=vPCBq%4*vfz zPIu5)3}-0DQ6!1QitknIh|4I|w(``<4^8y2u_Y}=SmZcTsfH^&WlGOP(Q7;#WuB&| zu}rvbG5i?+?`Iu z<&P{brc@l|4Y4sEUOYv4#H#;dqFYqs&dG>lInrl+;-oLpig(7F#YUTbX*x?(9!z6F xohBx1OgKoK!p4a0ieKW)jC5o(-7QINxv9M9W2Qlg%99>T&d`O6?Or5Z`3r^?x#$1@ diff --git a/plugins/roledefaults/init.lua b/plugins/roledefaults/init.lua index 2e6a888..db27d8d 100644 --- a/plugins/roledefaults/init.lua +++ b/plugins/roledefaults/init.lua @@ -11,16 +11,19 @@ end) local droleadd = command("droleadd",{ help = "Add a default role to assign for new users", usage = "droleadd ", + perms = {"administrator"}, args = { "role" }, exec = function(msg,args,opts) table.insert(config.default_roles,args[1].id) + msg:reply("Added role "..role.name.." to default roles list") end, }) local droledel = command("droledel",{ help = "Remove a role from the list of default roles", usage = "droledel ", + perms = {"administrator"}, args = { "role" }, @@ -30,9 +33,28 @@ local droledel = command("droledel",{ table.remove(config.default_roles,k) end end + msg:reply("Removed role "..role.name.." from default roles list") + end +}) +local drolelist = command("drolelist", { + help = "List all default roles", + usage = "drolelist", + perms = {"administrator"} + exec = function(msg,args,opts) + local reply = { embed = { + title = "Default roles:", + fields = {} + }} + for k,v in pairs(config.default_roles) do + table.insert(reply.embed.fields,{ + name = v, value = "" + }) + end + msg:reply(reply) end }) plugin:add_command(droleadd) plugin:add_command(droledel) +plugin:add_commmand(drolelist) return plugin