$findServerChannel

This function allows you to search for a specific channel within your Discord server. You can identify the channel by its name, mention, or ID.

The last parameter determines what the function returns: the channel's ID or undefined if the channel is not found.

Syntax

$findServerChannel[query;returnCurrentChannel (yes/no) (optional)]

Parameters:

  • query: (Required) The name, mention (e.g., <#1234567890>), or ID of the channel you're looking for.
  • returnCurrentChannel: (Optional) Specify whether to return the current channel's ID if not found.
    • yes: Returns the channel's ID.
    • no: Returns undefined if the channel is not found. Defaults to no if omitted.

Example

In this example, we're searching for a channel named "general" and telling the function not to return anything if the channel is not found.

Member04/23/2025
!!exec $findServerChannel[general;no]
Custom Command Bot 04/23/2025
802179504147136552

Related functions