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)
103 def repeat(self, irc, msg, args, name, seconds, command): 104 """ 105 106 Schedules the command to run every seconds, 107 starting now (i.e., the command runs now, and every seconds 108 thereafter). 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