From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.1.5] (unknown [101.128.125.100]) by gnuweeb.org (Postfix) with ESMTPSA id 5A4ED8057F; Sat, 3 Sep 2022 10:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1662199516; bh=ply5h+Ehl2XfgQGZkcTb6aEQqEPQAe4iRf1cb9u+W/4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=t9UcicabVqdudpyAR06GF+FlPkIEyfFQoI9CHTtoyvj2Kqq8s8r3xn2u/bapP+OUa dzQtiEZH+OW6F60XBqFKnpqe9NPpEg2ooEWIj/SB/gSWUaUIm4tHmv0tq5QcMUaVh4 IkwYDGKL4Bmsva5XQcj2lm6JyaZ0EnRKmTOIDTKVIhzFlLNrhMWQCADziaiK48lZ/t s8uQd0SKNF67Zp3NzqvIZzIlQ+uszvap+w/RjZot3AInfjN9pdsRXQZBt1KFQ6eQru bnqe9yV8UPeBhvTIq34e7QhLjBRsy6l5IVF0BKe/SQ107VQGOJb9+cEp+CIowAR3Me cpreJvxOdc2Mg== Message-ID: <37043daf-bbf9-1ed5-185c-2c223313a0a7@gnuweeb.org> Date: Sat, 3 Sep 2022 17:05:12 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v2 0/3] New Discord bot and full refactor scripts To: Ammar Faizi Cc: GNU/Weeb Mailing List , Alviro Iskandar Setiawan References: <20220827030236.1094-1-kiizuha@gnuweeb.org> <7a414bd1-68f1-86a4-e647-7ee071a4300d@gnuweeb.org> <4de7a42e-bdae-f3b3-2674-20d673d71a58@gnuweeb.org> <643c97fb-d517-4662-4ce0-6e31a97c9e07@gnuweeb.org> <604e99d6-23fb-8a47-5445-ca10c8655729@gnuweeb.org> Content-Language: en-US From: Muhammad Rizki In-Reply-To: <604e99d6-23fb-8a47-5445-ca10c8655729@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 03/09/2022 16.44, Ammar Faizi wrote: > On 9/3/22 8:01 AM, Muhammad Rizki wrote: >> The `ADMIN_ROLE_ID` is the Discord role ID for `Lore Admin` to manage >> add/delete atom/broadcast. You can copy it from the role management in >> Discord, paste the role ID to the ADMIN_ROLE_ID in >> daemon/dscord/config.py (the config name must config.py because it will >> importable with Python) > > I did that, it's running and the bot is online as well. But how to use > the bot exactly? Any example? > Oh yes, my bad. I develop the script to avoid ratelimit for syncing slash commands, so I decide to init it using the [`$sync`, `.sync`, `.s`, `$s`] or whatever is, you can find it the basic command in the `daemon/dscord/gnuweeb/plugins/basic_commands/sync_it.py` file. The old one I sync it in the `setup_hook()` in client.py, so when the bot is starting, it will initialize/sync the slash commands to global, this is not recommended by the community, because while you debugging you will restarting the script many times, it will hit the ratelimit, so I decide to comment it and initialize using the `.sync` basic commmand. The bot uses slash commands, if you type "/" in the channel text field chat, it will display the list of slash commands, for example: Typing `/atom` it will display the list of group commands for atom like add, list or delete. Typing `/broadcast` it will display the list of group commands for broadcast like add, list or delete. Still didn't work? tell me.