This repository has been archived by the owner on Nov 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
129 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Tourmaline | ||
alias BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | | ||
BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | | ||
BotCommandScopeChatMember | ||
end |
8 changes: 8 additions & 0 deletions
8
src/tourmaline/models/bot_command_scope_all_chat_administrators.cr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Tourmaline | ||
class BotCommandScopeAllChatAdministrators | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "all_chat_administrators" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Tourmaline | ||
class BotCommandScopeAllGroupChats | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "all_group_chats" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Tourmaline | ||
class BotCommandScopeAllPrivateChats | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "all_private_chats" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Tourmaline | ||
class BotCommandScopeChat | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "chat" | ||
|
||
# Unique identifier for the target chat or username of the target supergroup | ||
# (in the format `@supergroupusername`) | ||
property chat_id : Int64 | String | ||
|
||
def initialize(chat : Chat | Int64 | String) | ||
@chat_id = chat.is_a?(Chat) ? chat.id : chat | ||
end | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
src/tourmaline/models/bot_command_scope_chat_administrators.cr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Tourmaline | ||
class BotCommandScopeChatAdministrators | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "chat_administrators" | ||
|
||
# Unique identifier for the target chat or username of the target supergroup | ||
# (in the format `@supergroupusername`) | ||
property chat_id : Int64 | String | ||
|
||
def initialize(chat : Chat | Int64 | String) | ||
@chat_id = chat.is_a?(Chat) ? chat.id : chat | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Tourmaline | ||
class BotCommandScopeChatMember | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "chat_member" | ||
|
||
# Unique identifier for the target chat or username of the target supergroup | ||
# (in the format `@supergroupusername`) | ||
property chat_id : Int64 | String | ||
|
||
# Unique identifier of the target user | ||
property user_id : Int64 | ||
|
||
def initialize(chat : Chat | Int64 | String, user : User | Int64) | ||
@chat_id = chat.is_a?(Chat) ? chat.id : chat | ||
@user_id = user.is_a?(User) ? user.id : user | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Tourmaline | ||
class BotCommandScopeDefault | ||
include JSON::Serializable | ||
include Tourmaline::Model | ||
|
||
getter type : String = "default" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters