$systemChannelID

Returns the server’s system channel ID (returns an error if there isn’t such a channel).

Syntax

$systemChannelID 

Example

$nomention
System channel ID: $systemChannelID
!example System channel ID: 566364581522440232

How to stop the error message?

The $systemChannelID function as said in above returns an error if there isn’t any system channel set on the server and there is a way to stop that.

$nomention
$try 
  System channel ID: $systemChannelID
$catch
  No system channel found!
$endtry
  • Without try block:
!example ❌ Function $systemChannelID at 3:37 returned an error: No system channel set in this server!
  • With try block:
!example No system channel found!

For more information, read the Error Handling guide.