201
202 @commands.command(name="rename", alias=["ren"], description="Rename a file")
203 async def rename(self, ctx, filename, newname):
204 if (205 not ctx.author
206 in self.bot.get_guild(838727867428765766)
207 .get_role(884453174839230464)
184
185 @commands.command(alias=["reboot"], description="Reboot the bot")
186 async def restart(self, ctx):
187 if (188 not ctx.author
189 in self.bot.get_guild(838727867428765766)
190 .get_role(884453174839230464)
166 name="presence", alias=["status"], description="Change the bot's presence"
167 )
168 async def presence(self, ctx, *, text):
169 if (170 not ctx.author
171 in self.bot.get_guild(838727867428765766)
172 .get_role(884453174839230464)
141 @commands.command(alias=["del", "remove", "rm"], descriiption="Delete a file")
142 async def delete(self, ctx, filename):
143 # await ctx.defer(complete_hidden=True)
144 if (145 not ctx.author
146 in self.bot.get_guild(838727867428765766)
147 .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)