Как получить id сервера discord py
I’m not using discord.ext, just discord. I need to find the server ID that the bot is currently connected to. I’ve done some googling, but could only find 1 stack overflow question and the answer wasn’t helpful. I could really use this, thanks!
3 Answers 3
You didn’t specify how you want to get the server ID, so here is an example using the command, you get ID of server, where this command was used.
You can check it and output with print for example print(id) will give output like this: Also you can just add ctx.send(id) and Discord Bot will send this ID to server chat. Discord guild id have integer type. Now you got ID and can manipulate with it. Read more about it here
How to Find a Server ID in Discord on a PC or Smartphone
Practically everything you see on Discord has a unique 18-digit number assigned to it. Users, messages, channels, and Discord servers all have special IDs. These numbers are typically used by developers to reference individual items.
While you can enjoy Discord life without knowing any of these IDs, there are times when a server ID is required to help investigate or resolve an issue. Read on to learn how to find a Discord server ID.
Before retrieving any ID, you must first enable “Developer Mode.” This gives you the ability to copy IDs and makes other information available. We’ve included the steps on how to do that. Our FAQs also include how to find your user ID, other user’s IDs, and message and channel IDs – just in case.
How to Find a Discord Server ID on a PC
To locate the server ID, you’ll first need to turn on “Developer Mode.” Here’s how from the desktop app and web browser access:
- Sign in to Discord.
- Beside your username at the bottom left, click the “Settings” icon.
- From the menu on the left, choose the “APP SETTINGS” option.
- Scroll down to the “Advanced” section then click on the slider beside the “Developer Mode” option.
- Now press ESC or click X to close the settings.
Note: “Developer Mode” is enabled once the slider is blue and disabled when gray.
Now to find a server’s ID:
- Above the text channel list, right-click on the server’s name to open it.
- Choose “Copy ID.”
- Paste the ID somewhere for later use.
- You can disable “Developer Mode” now if you wish.
- You can disable “Developer Mode” now if you wish.
How to Find a Discord Server ID on an iPhone
Before copying a server ID, you’ll need to enable “Developer Mode.” Here’s how to use your iPhone or any iOS device:
- Sign in to your Discord account.
- From the top left, tap the three-lined menu icon to access the menu panel.
- At the bottom right of the menu, tap your profile icon.
- Swipe up to find the “APP SETTINGS,” then tap “Appearance,” look for “ADVANCED.”
- Next, tap the slider beside the “Developer Mode” option to enable it.
- Exit the “Appearance” menu.
Note: When the slider is gray “Developer Mode” is disabled; it’s blue when enabled.
Now to find a server’s ID:
- Above the channel list, find the server’s name then tap the three-dotted icon next to it.
- At the bottom of the drop-down menu, choose “Copy ID.”
- The server ID will be copied to your clipboard.
How to Find a Discord Server ID on an Android Device
Before retrieving a server ID, you’ll need to turn on “Developer Mode.” To do this, complete the following steps on your Android device:
- Sign in to your Discord account.
- Tap the hamburger menu icon.
- Tap your profile icon at the bottom right.
- Choose “User Settings,” “App Settings,” then “Behavior.”
- Now enable “Developer Mode” by tapping the slider beside it, under the “CHAT BEHAVIOR”
- Exit the “Behavior” menu.
Note: “Developer Mode” is enabled once the slider is blue and disabled when it’s gray.
To copy a server’s ID:
- Above the channel list, long-press on the server’s name.
- From the drop-down menu, tap “Copy ID.”
- The server ID will be copied to your clipboard.
- The server ID will be copied to your clipboard.
Additional FAQs
How to Find a Discord Channel ID?
From the desktop with “Developer Mode” enabled:
1. Right-click on the channel.
2. Select “Copy ID” from the menu.
· The channel’s ID will be copied to your clipboard.
From an iOS device with “Developer Mode” enabled:
1. Find the channel then long-press it.
2. Tap “Copy ID” from the menu options.
From an Android device with “Developer Mode” enabled:
1. Locate the channel and long press it.
2. Select “Copy ID” from the menu.
How to Find a Discord Message ID?
From the desktop with “Developer Mode” enabled:
1. Find the message, then right-click anywhere within the text.
2. Click “Copy ID” from the menu.
· The channel’s ID will be copied to your clipboard.
From an iOS device with “Developer Mode” enabled:
1. Find the message, then long press anywhere within its text.
2. Tap “Copy ID” from the menu.
From an Android device with “Developer Mode” enabled:
1. Find the message and long press on the text.
Discord Server ID Retrieval
To identify specific Discord elements like users, text or voice messages, channels, and servers, a unique number is assigned to it This makes things easier when Discord needs to resolve a problem or carry out an investigation.
Obtaining a server ID, or any other ID for that matter is easy from the desktop or mobile app. Once “Developer Mode” is enabled under “Advanced” settings, by right-clicking or long-pressing the item you’ll have the option to “Copy ID.” The item’s ID is then copied to your clipboard.
What type of topics do you enjoy talking about on Discord? What do you think about Discord in general? Do you use other similar platforms – if so, how do they compare? Share your thoughts in the comments section.
How do I get a server's ID with discord.py?
I’m not using discord.ext, just discord. I need to find the server ID that the bot is currently connected to. I’ve done some googling, but could only find 1 stack overflow question and the answer wasn’t helpful. I could really use this, thanks!
4 Answers 4
You didn’t specify how you want to get the server ID, so here is an example using the command, you get ID of server, where this command was used.
You can check it and output with print for example print(id) will give output like this: Also you can just add ctx.send(id) and Discord Bot will send this ID to server chat. Discord guild id have integer type. Now you got ID and can manipulate with it. Read more about it here
How to Find a Server ID in Discord on a PC or Smartphone
Practically everything you see on Discord has a unique 18-digit number assigned to it. Users, messages, channels, and Discord servers all have special IDs. These numbers are typically used by developers to reference individual items.
While you can enjoy Discord life without knowing any of these IDs, there are times when a server ID is required to help investigate or resolve an issue. Read on to learn how to find a Discord server ID.
Before retrieving any ID, you must first enable “Developer Mode.” This gives you the ability to copy IDs and makes other information available. We’ve included the steps on how to do that. Our FAQs also include how to find your user ID, other user’s IDs, and message and channel IDs – just in case.
How to Find a Discord Server ID on a PC
To locate the server ID, you’ll first need to turn on “Developer Mode.” Here’s how from the desktop app and web browser access:
- Sign in to Discord.
- Beside your username at the bottom left, click the “Settings” icon.
- From the menu on the left, choose the “APP SETTINGS” option.
- Scroll down to the “Advanced” section then click on the slider beside the “Developer Mode” option.
- Now press ESC or click X to close the settings.
Note: “Developer Mode” is enabled once the slider is blue and disabled when gray.
Now to find a server’s ID:
- Above the text channel list, right-click on the server’s name to open it.
- Choose “Copy ID.”
- Paste the ID somewhere for later use.
- You can disable “Developer Mode” now if you wish.
- You can disable “Developer Mode” now if you wish.
How to Find a Discord Server ID on an iPhone
Before copying a server ID, you’ll need to enable “Developer Mode.” Here’s how to use your iPhone or any iOS device:
- Sign in to your Discord account.
- From the top left, tap the three-lined menu icon to access the menu panel.
- At the bottom right of the menu, tap your profile icon.
- Swipe up to find the “APP SETTINGS,” then tap “Appearance,” look for “ADVANCED.”
- Next, tap the slider beside the “Developer Mode” option to enable it.
- Exit the “Appearance” menu.
Note: When the slider is gray “Developer Mode” is disabled; it’s blue when enabled.
Now to find a server’s ID:
- Above the channel list, find the server’s name then tap the three-dotted icon next to it.
- At the bottom of the drop-down menu, choose “Copy ID.”
- The server ID will be copied to your clipboard.
How to Find a Discord Server ID on an Android Device
Before retrieving a server ID, you’ll need to turn on “Developer Mode.” To do this, complete the following steps on your Android device:
- Sign in to your Discord account.
- Tap the hamburger menu icon.
- Tap your profile icon at the bottom right.
- Choose “User Settings,” “App Settings,” then “Behavior.”
- Now enable “Developer Mode” by tapping the slider beside it, under the “CHAT BEHAVIOR”
- Exit the “Behavior” menu.
Note: “Developer Mode” is enabled once the slider is blue and disabled when it’s gray.
To copy a server’s ID:
- Above the channel list, long-press on the server’s name.
- From the drop-down menu, tap “Copy ID.”
- The server ID will be copied to your clipboard.
- The server ID will be copied to your clipboard.
Additional FAQs
How to Find a Discord Channel ID?
From the desktop with “Developer Mode” enabled:
1. Right-click on the channel.
2. Select “Copy ID” from the menu.
· The channel’s ID will be copied to your clipboard.
From an iOS device with “Developer Mode” enabled:
1. Find the channel then long-press it.
2. Tap “Copy ID” from the menu options.
From an Android device with “Developer Mode” enabled:
1. Locate the channel and long press it.
2. Select “Copy ID” from the menu.
How to Find a Discord Message ID?
From the desktop with “Developer Mode” enabled:
1. Find the message, then right-click anywhere within the text.
2. Click “Copy ID” from the menu.
· The channel’s ID will be copied to your clipboard.
From an iOS device with “Developer Mode” enabled:
1. Find the message, then long press anywhere within its text.
2. Tap “Copy ID” from the menu.
From an Android device with “Developer Mode” enabled:
1. Find the message and long press on the text.
Discord Server ID Retrieval
To identify specific Discord elements like users, text or voice messages, channels, and servers, a unique number is assigned to it This makes things easier when Discord needs to resolve a problem or carry out an investigation.
Obtaining a server ID, or any other ID for that matter is easy from the desktop or mobile app. Once “Developer Mode” is enabled under “Advanced” settings, by right-clicking or long-pressing the item you’ll have the option to “Copy ID.” The item’s ID is then copied to your clipboard.
What type of topics do you enjoy talking about on Discord? What do you think about Discord in general? Do you use other similar platforms – if so, how do they compare? Share your thoughts in the comments section.
Как получить идентификатор пользователя в Discord.py
Мы пишем бота для нашего сервера Discord, который должен упоминать человека, который запускает определенную команду. Для этого мне понадобится идентификатор пользователя, но я не могу понять, как его получить.
Мы попробовали это так, поскольку в документации сказано, что идентификатор пользователя находится в классе User. Но единственное, что мы получаем, это
На наш взгляд, мы получили правильный параметр, но не можем получить само удостоверение личности? Мы должны преобразовать это как-то?