203
204 @commands.command(name="rename", alias=["ren"], description="Rename a file")
205 async def rename(self, ctx, filename, newname):
206 if (207 not ctx.author
208 in self.bot.get_guild(838727867428765766)
209 .get_role(884453174839230464)
186
187 @commands.command(alias=["reboot"], description="Reboot the bot")
188 async def restart(self, ctx):
189 if (190 not ctx.author
191 in self.bot.get_guild(838727867428765766)
192 .get_role(884453174839230464)
168 name="presence", alias=["status"], description="Change the bot's presence"
169 )
170 async def presence(self, ctx, *, text):
171 if (172 not ctx.author
173 in self.bot.get_guild(838727867428765766)
174 .get_role(884453174839230464)
143 @commands.command(alias=["del", "remove", "rm"], descriiption="Delete a file")
144 async def delete(self, ctx, filename):
145 # await ctx.defer(complete_hidden=True)
146 if (147 not ctx.author
148 in self.bot.get_guild(838727867428765766)
149 .get_role(884453174839230464)
Tests for membership should use the form x not in the_list
rather than not x in the_list
. The former example is simply more readable.
if not x in authors:
authors.append(x)
if x not in authors:
authors.append(x)