utils Module

utils Module

utils.all_possible_beards(paths)[source]

List generator of all plug-ins that Skybeard has found and can be loaded

utils.embolden(string)[source]

wraps a string in bold tags

utils.get_args(msg_or_text, return_string=False, **kwargs)[source]

Helper function when the command used in the telegram chat may have arguments, e.g /command arg1 arg2. Returns a list of any arguments found after the command

utils.get_literal_beard_paths(beard_paths)[source]

Returns list of literal beard paths.

utils.get_literal_path(path_or_autoloader)[source]

Gets literal path from AutoLoader or returns input.

utils.is_module(path)[source]

Checks if path is a module.

utils.italisize(string)[source]

wraps a string in italic tags

utils.partition_text(text)[source]

Generator for splitting long texts into ones below the character limit. Messages are split at the nearest line break and each successive chunk is yielded. Relatively untested