mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
Rename the lib to "teloxide"
This commit is contained in:
parent
c2677929f1
commit
7b3c51ff1b
10 changed files with 34 additions and 34 deletions
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "telebofr"
|
||||
name = "teloxide"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 telebofr
|
||||
Copyright (c) 2019 teloxide
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
10
README.md
10
README.md
|
@ -1,18 +1,18 @@
|
|||
|
||||
<div align="center">
|
||||
<img src="ICON.png" width="200"/>
|
||||
<h1>telebofr</h1>
|
||||
<h1>teloxide</h1>
|
||||
|
||||
<a href="https://docs.rs/telebofr/">
|
||||
<a href="https://docs.rs/teloxide/">
|
||||
<img src="https://img.shields.io/badge/docs.rs-link-blue.svg">
|
||||
</a>
|
||||
<a href="https://travis-ci.com/telebofr/telebofr">
|
||||
<img src="https://travis-ci.com/telebofr/telebofr.svg?branch=dev" />
|
||||
<a href="https://travis-ci.com/teloxide/teloxide">
|
||||
<img src="https://travis-ci.com/teloxide/teloxide.svg?branch=dev" />
|
||||
</a>
|
||||
<a href="LICENSE">
|
||||
<img src="https://img.shields.io/badge/license-MIT-blue.svg">
|
||||
</a>
|
||||
<a href="https://crates.io/crates/telebofr">
|
||||
<a href="https://crates.io/crates/teloxide">
|
||||
<img src="https://img.shields.io/badge/crates.io-v0.1.0-orange.svg">
|
||||
</a>
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ impl Bot {
|
|||
/// ## Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// use telebofr::types::File as TgFile;
|
||||
/// use teloxide::types::File as TgFile;
|
||||
/// use tokio::fs::File;
|
||||
/// # use telebofr::RequestError;
|
||||
/// use telebofr::Bot;
|
||||
/// # use teloxide::RequestError;
|
||||
/// use teloxide::Bot;
|
||||
///
|
||||
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
/// let bot = Bot::new("TOKEN");
|
||||
|
|
|
@ -11,7 +11,7 @@ impl Bot {
|
|||
///
|
||||
/// ## Example
|
||||
/// ```no_run
|
||||
/// # use telebofr::{Bot, requests::payloads::SendMessage};
|
||||
/// # use teloxide::{Bot, requests::payloads::SendMessage};
|
||||
/// # #[tokio::main] async fn main_() {
|
||||
/// let bot = Bot::new("TOKEN");
|
||||
/// let payload = SendMessage::new(123456, "text");
|
||||
|
@ -48,7 +48,7 @@ impl Bot {
|
|||
///
|
||||
/// ## Example
|
||||
/// ```no_run
|
||||
/// # use telebofr::{Bot, requests::payloads::SendMessage};
|
||||
/// # use teloxide::{Bot, requests::payloads::SendMessage};
|
||||
/// # #[tokio::main] async fn main_() {
|
||||
/// let bot = Bot::new("TOKEN");
|
||||
/// let payload = SendMessage::new(123456, "text");
|
||||
|
@ -73,7 +73,7 @@ impl Bot {
|
|||
///
|
||||
/// ## Example
|
||||
/// ```no_run
|
||||
/// # use telebofr::{Bot, requests::payloads::SendAnimation, types::InputFile};
|
||||
/// # use teloxide::{Bot, requests::payloads::SendAnimation, types::InputFile};
|
||||
/// # #[tokio::main] async fn main_() {
|
||||
/// let bot = Bot::new("TOKEN");
|
||||
/// let payload = SendAnimation::new(
|
||||
|
|
|
@ -18,7 +18,7 @@ pub trait ErrorPolicy<E> {
|
|||
/// ```
|
||||
/// # #[tokio::main]
|
||||
/// # async fn main_() {
|
||||
/// use telebofr::dispatching::dispatchers::filter::error_policy::{
|
||||
/// use teloxide::dispatching::dispatchers::filter::error_policy::{
|
||||
/// ErrorPolicy, Ignore,
|
||||
/// };
|
||||
///
|
||||
|
@ -50,7 +50,7 @@ where
|
|||
/// # async fn main_() {
|
||||
/// use std::convert::{TryInto, Infallible};
|
||||
///
|
||||
/// use telebofr::dispatching::dispatchers::filter::error_policy::{
|
||||
/// use teloxide::dispatching::dispatchers::filter::error_policy::{
|
||||
/// ErrorPolicy,
|
||||
/// IgnoreSafe,
|
||||
/// };
|
||||
|
@ -66,7 +66,7 @@ where
|
|||
/// ```
|
||||
///
|
||||
/// ```compile_fail
|
||||
/// use telebofr::dispatching::dispatchers::filter::error_policy::{
|
||||
/// use teloxide::dispatching::dispatchers::filter::error_policy::{
|
||||
/// ErrorPolicy, IgnoreSafe,
|
||||
/// };
|
||||
///
|
||||
|
@ -111,7 +111,7 @@ impl ErrorPolicy<Infallible> for IgnoreSafe {
|
|||
/// ```
|
||||
/// # #[tokio::main]
|
||||
/// # async fn main_() {
|
||||
/// use telebofr::dispatching::dispatchers::filter::error_policy::ErrorPolicy;
|
||||
/// use teloxide::dispatching::dispatchers::filter::error_policy::ErrorPolicy;
|
||||
///
|
||||
/// let closure = |e: i32| async move { eprintln!("Error code{}", e) };
|
||||
///
|
||||
|
|
|
@ -54,7 +54,7 @@ type FiltersAndHandlers<'a, T, E> = Vec<FilterAndHandler<'a, T, E>>;
|
|||
/// # async fn run() {
|
||||
/// use std::convert::Infallible;
|
||||
///
|
||||
/// use telebofr::{
|
||||
/// use teloxide::{
|
||||
/// dispatching::{
|
||||
/// dispatchers::filter::{
|
||||
/// error_policy::ErrorPolicy, FilterDispatcher,
|
||||
|
|
|
@ -6,7 +6,7 @@ pub trait Filter<T> {
|
|||
}
|
||||
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::Filter;
|
||||
/// use teloxide::dispatching::filters::Filter;
|
||||
///
|
||||
/// let closure = |i: &i32| -> bool { *i >= 42 };
|
||||
/// assert!(closure.test(&42));
|
||||
|
@ -22,7 +22,7 @@ impl<T, F: Fn(&T) -> bool> Filter<T> for F {
|
|||
}
|
||||
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::Filter;
|
||||
/// use teloxide::dispatching::filters::Filter;
|
||||
///
|
||||
/// assert!(true.test(&()));
|
||||
/// assert_eq!(false.test(&()), false);
|
||||
|
@ -42,7 +42,7 @@ impl<T> Filter<T> for bool {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{And, Filter};
|
||||
/// use teloxide::dispatching::filters::{And, Filter};
|
||||
///
|
||||
/// // Note: bool can be treated as `Filter` that always return self.
|
||||
/// assert_eq!(And::new(true, false).test(&()), false);
|
||||
|
@ -73,7 +73,7 @@ where
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{and, Filter};
|
||||
/// use teloxide::dispatching::filters::{and, Filter};
|
||||
///
|
||||
/// assert!(and(true, true).test(&()));
|
||||
/// assert_eq!(and(true, false).test(&()), false);
|
||||
|
@ -93,7 +93,7 @@ pub fn and<A, B>(a: A, b: B) -> And<A, B> {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{Filter, Or};
|
||||
/// use teloxide::dispatching::filters::{Filter, Or};
|
||||
///
|
||||
/// // Note: bool can be treated as `Filter` that always return self.
|
||||
/// assert!(Or::new(true, false).test(&()));
|
||||
|
@ -124,7 +124,7 @@ where
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{or, Filter};
|
||||
/// use teloxide::dispatching::filters::{or, Filter};
|
||||
///
|
||||
/// assert!(or(true, false).test(&()));
|
||||
/// assert_eq!(or(false, false).test(&()), false);
|
||||
|
@ -141,7 +141,7 @@ pub fn or<A, B>(a: A, b: B) -> Or<A, B> {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{Filter, Not};
|
||||
/// use teloxide::dispatching::filters::{Filter, Not};
|
||||
///
|
||||
/// // Note: bool can be treated as `Filter` that always return self.
|
||||
/// assert!(Not::new(false).test(&()));
|
||||
|
@ -169,7 +169,7 @@ where
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{not, Filter};
|
||||
/// use teloxide::dispatching::filters::{not, Filter};
|
||||
///
|
||||
/// assert!(not(false).test(&()));
|
||||
/// assert_eq!(not(true).test(&()), false);
|
||||
|
@ -187,7 +187,7 @@ pub fn not<A>(a: A) -> Not<A> {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::{all, dispatching::filters::Filter};
|
||||
/// use teloxide::{all, dispatching::filters::Filter};
|
||||
///
|
||||
/// assert!(all![true].test(&()));
|
||||
/// assert!(all![true, true].test(&()));
|
||||
|
@ -218,7 +218,7 @@ macro_rules! all {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::{any, dispatching::filters::Filter};
|
||||
/// use teloxide::{any, dispatching::filters::Filter};
|
||||
///
|
||||
/// assert!(any![true].test(&()));
|
||||
/// assert!(any![true, true].test(&()));
|
||||
|
@ -246,7 +246,7 @@ macro_rules! any {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{f, And, Filter, Or, F};
|
||||
/// use teloxide::dispatching::filters::{f, And, Filter, Or, F};
|
||||
///
|
||||
/// let flt1 = |i: &i32| -> bool { *i > 17 };
|
||||
/// let flt2 = |i: &i32| -> bool { *i < 42 };
|
||||
|
@ -314,7 +314,7 @@ pub trait FilterExt<T> {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{Filter, FilterExt};
|
||||
/// use teloxide::dispatching::filters::{Filter, FilterExt};
|
||||
///
|
||||
/// let flt = |i: &i32| -> bool { *i > 0 };
|
||||
/// let flt = flt.not();
|
||||
|
@ -334,7 +334,7 @@ pub trait FilterExt<T> {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{Filter, FilterExt};
|
||||
/// use teloxide::dispatching::filters::{Filter, FilterExt};
|
||||
///
|
||||
/// let flt = |i: &i32| -> bool { *i > 0 };
|
||||
/// let flt = flt.and(|i: &i32| *i < 42);
|
||||
|
@ -356,7 +356,7 @@ pub trait FilterExt<T> {
|
|||
///
|
||||
/// ## Examples
|
||||
/// ```
|
||||
/// use telebofr::dispatching::filters::{Filter, FilterExt};
|
||||
/// use teloxide::dispatching::filters::{Filter, FilterExt};
|
||||
///
|
||||
/// let flt = |i: &i32| -> bool { *i < 0 };
|
||||
/// let flt = flt.or(|i: &i32| *i > 42);
|
||||
|
|
|
@ -45,7 +45,7 @@ pub enum InlineKeyboardButtonKind {
|
|||
///
|
||||
/// Example:
|
||||
/// ```
|
||||
/// use telebofr::types::InlineKeyboardButton;
|
||||
/// use teloxide::types::InlineKeyboardButton;
|
||||
///
|
||||
/// let url_button = InlineKeyboardButton::url(
|
||||
/// "Text".to_string(),
|
||||
|
|
|
@ -16,7 +16,7 @@ pub struct InlineKeyboardMarkup {
|
|||
///
|
||||
/// Example:
|
||||
/// ```
|
||||
/// use telebofr::types::{InlineKeyboardButton, InlineKeyboardMarkup};
|
||||
/// use teloxide::types::{InlineKeyboardButton, InlineKeyboardMarkup};
|
||||
///
|
||||
/// let url_button = InlineKeyboardButton::url(
|
||||
/// "text".to_string(),
|
||||
|
|
Loading…
Reference in a new issue