Flarum extensions can use throttlers to achieve this https://docs.flarum.org/extend/api-throttling/#custom-throttlers
But actually, Flarum has a built-in throttler for posting flarum/frameworkblob/v1.8.5/framework/core/src/Post/PostCreationThrottler.php
You could create a modified version of the PostCreationThrottler
and register it in addition or in place of the default throttler using the throttler API.
I don't think it's documented anywhere and I haven't tried, but since the timeout is a public static property on the class, you should be able to modify the value of the built-in throttler without having to create any class or use any extender.
Something like \Flarum\Post\PostCreationThrottler::$timeout = 10;
added above the return
statement in extend.php
will probably work. The timeout is the number of seconds.