Every line of 'python repeat command' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
9 @commands.command(name='.repeat', aliases=['.r']) 10 @has_permission('session.repeat') 11 async def repeat(self, ctx, n: int, *, text): 12 terminal = sessions().get_by_channel(ctx.message.channel) 13 if not terminal: 14 raise SessionDontExistException() 15 16 terminal.input(text * n)
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
103 def repeat(self, irc, msg, args, name, seconds, command): 104 """<name> <seconds> <command> 105 106 Schedules the command <command> to run every <seconds> seconds, 107 starting now (i.e., the command runs now, and every <seconds> seconds 108 thereafter). <name> is a name by which the command can be 109 unscheduled. 110 """ 111 name = name.lower() 112 self.events[name] = command 113 f = self._makeCommandFunction(irc, msg, command, remove=False) 114 id = schedule.addPeriodicEvent(f, seconds, name) 115 assert id == name