How to use 'python repeat command' in Python

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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
9@commands.command(name='.repeat', aliases=['.r'])
11async def repeat(self, ctx, n: int, *, text):
12 terminal = sessions().get_by_channel(
13 if not terminal:
14 raise SessionDontExistException()
16 terminal.input(text * n)

Use secure code every time

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

103def repeat(self, irc, msg, args, name, seconds, command):
104 """<name> <seconds> <command>
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[name] = command
113 f = self._makeCommandFunction(irc, msg, command, remove=False)
114 id = schedule.addPeriodicEvent(f, seconds, name)
115 assert id == name

Related snippets