File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export class PolePlugin extends PluginBase {
122122 if ( String ( msg . sender . id ) . startsWith ( '-100' ) ) {
123123 return ;
124124 }
125- if ( ! String ( msg . conversation . id ) . startsWith ( '-' ) ) {
125+ if ( ! String ( msg . conversation . id ) . startsWith ( '-' ) || msg . conversation . type !== 'group' ) {
126126 return this . bot . replyMessage ( msg , this . bot . errors . groupOnly ) ;
127127 }
128128 if ( await hasTag ( this . bot , msg . conversation . id , 'nopole' ) ) {
Original file line number Diff line number Diff line change @@ -138,13 +138,17 @@ export class User {
138138export class Conversation {
139139 id : number | string ;
140140 title : string ;
141+ type : ConversationType ;
141142
142- constructor ( id : number | string , title ?: string ) {
143+ constructor ( id : number | string , title ?: string , type ?: ConversationType ) {
143144 this . id = id ;
144145 this . title = title ;
146+ this . type = type ;
145147 }
146148}
147149
150+ type ConversationType = 'private' | 'group' | 'channel' ;
151+
148152export class ConversationInfo extends Conversation { }
149153
150154export class Message {
You can’t perform that action at this time.
0 commit comments