All of the necessary methods are already implemented, what's missing is a some kind of helper function.
More info: https://core.telegram.org/bots/api#setwebhook