Edits history of script submission #238 for ' Kick a Chat Member (telegram)'

  • deno
    import { Telegram } from "npm:[email protected]";
    
    /**
     * @param until_date Unix time. If user is banned for more than
     * 366 days or less than 30 seconds from the current time they
     * are considered to be banned forever.
     *
     * @param revoke_messages If `true` then the banned user's messages
     * will be deleted from the chat.
     */
    type Telegram = {
      token: string;
    };
    export async function main(
      auth: Telegram,
      chat_id: string,
      user_id: number,
      until_date?: number,
      revoke_messages?: boolean | undefined,
    ) {
      const client = new Telegram(auth.token);
      return await client.banChatMember(chat_id, user_id, until_date || undefined, {
        revoke_messages,
      });
    }
    

    Submitted by hugo697 399 days ago

  • deno
    import { Telegram } from "npm:[email protected]";
    
    /**
     * @param until_date Unix time. If user is banned for more than
     * 366 days or less than 30 seconds from the current time they
     * are considered to be banned forever.
     *
     * @param revoke_messages If `true` then the banned user's messages
     * will be deleted from the chat.
     */
    type Telegram = {
      token: string;
    };
    export async function main(
      auth: Telegram,
      chat_id: string,
      user_id: number,
      until_date?: number,
      revoke_messages?: boolean | undefined,
    ) {
      const client = new Telegram(auth.token);
      return await client.banChatMember(chat_id, user_id, until_date || undefined, {
        revoke_messages,
      });
    }
    

    Submitted by admin 1031 days ago

  • deno
    import { Telegram } from "npm:[email protected]"
    
    /** 
     * @param until_date Unix time. If user is banned for more than 
     * 366 days or less than 30 seconds from the current time they 
     * are considered to be banned forever.
     * 
     * @param revoke_messages If `true` then the banned user's messages 
     * will be deleted from the chat.
     */
    type Telegram = {
      token: string;
    };
    export async function main(
      auth: Telegram,
      chat_id: string,
      user_id: number,
      until_date?: number,
      revoke_messages?: boolean | undefined
    ) {
      const client = new Telegram(auth.token)
      return await client.banChatMember(
        chat_id,
        user_id,
        until_date || undefined,
        {
          revoke_messages
        }
      )
    }
    

    Submitted by admin 1034 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
    import { Telegram } from "npm:[email protected]"
    
    /** 
     * @param until_date Unix time. If user is banned for more than 
     * 366 days or less than 30 seconds from the current time they 
     * are considered to be banned forever.
     * 
     * @param revoke_messages If `true` then the banned user's messages 
     * will be deleted from the chat.
     */
    export async function main(
      auth: wmill.Resource<"telegram">,
      chat_id: string,
      user_id: number,
      until_date?: number,
      revoke_messages?: boolean | undefined
    ) {
      const client = new Telegram(auth.token)
      return await client.banChatMember(
        chat_id,
        user_id,
        until_date || undefined,
        {
          revoke_messages
        }
      )
    }
    

    Submitted by adam186 1163 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
    import { Telegram } from "npm:[email protected]"
    
    /** 
     * @param until_date Unix time. If user is banned for more than 
     * 366 days or less than 30 seconds from the current time they 
     * are considered to be banned forever.
     * 
     * @param revoke_messages If `true` then the banned user's messages 
     * will be deleted from the chat.
     */
    export async function main(
      auth: wmill.Resource<"telegram">,
      chat_id: string,
      user_id: number,
      until_date?: number,
      revoke_messages?: boolean | undefined
    ) {
      const client = new Telegram(auth.token)
      return await client.banChatMember(
        chat_id,
        user_id,
        until_date || undefined,
        {
          revoke_messages
        }
      )
    }
    

    Submitted by adam186 1198 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
    import { Telegram } from "npm:[email protected]"
    
    /** 
     * @param until_date Unix time. If user is banned for more than 
     * 366 days or less than 30 seconds from the current time they 
     * are considered to be banned forever.
     * 
     * @param revoke_messages If `true` then the banned user's messages 
     * will be deleted from the chat.
     */
    export async function main(
      auth: wmill.Resource<"telegram">,
      chat_id: string,
      user_id: number,
      until_date?: number,
      revoke_messages?: boolean | undefined
    ) {
      const client = new Telegram(auth.token)
      return await client.banChatMember(
        chat_id,
        user_id,
        until_date || undefined,
        {
          revoke_messages
        }
      )
    }
    

    Submitted by adam186 1279 days ago