parse_mode_setter 1.0.0 copy "parse_mode_setter: ^1.0.0" to clipboard
parse_mode_setter: ^1.0.0 copied to clipboard

A plugin for Televerse. Let's you set parse mode all methods in one line.

example/parse_mode_setter_example.dart

import 'dart:io';

import 'package:parse_mode_setter/parse_mode_setter.dart';
import 'package:televerse/televerse.dart';

final bot = Bot(Platform.environment["BOT_TOKEN"]!);

void main(List<String> args) {
  // Attach the Parse Mode Setter with passing necessary parameters.
  // Here we are setting the parse mode to HTML.
  bot.use(ParseModeSetter(ParseMode.html));

  bot.command('start', (ctx) async {
    // Now use HTML text within the methods, don't worry about not passing the parse mode
    await ctx.reply(
      "Hello <b>World</b>\n\nThis is a <i>great story of the Detective Rajappan</i>. I hope you've heard of Rajappan. "
      "Well, if you haven't he's a <tg-spoiler>super detective.</tg-spoiler>",
    );
  });

  bot.start();
}
1
likes
0
pub points
4%
popularity

Publisher

verified publisherxooniverse.com

A plugin for Televerse. Let's you set parse mode all methods in one line.

Repository (GitHub)
View/report issues

Topics

#televerse #telegram-bot #plugin #telegram

Funding

Consider supporting this project:

buymeacoffee.com

License

unknown (license)

Dependencies

televerse

More

Packages that depend on parse_mode_setter