Skip to content

Commit

Permalink
Added script to get list of roles
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieMc0 committed Nov 14, 2023
1 parent e728ffa commit 0dfaf52
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 0 deletions.
34 changes: 34 additions & 0 deletions get-list-of-roles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import discord
import os
import logging
import csv

TOKEN = os.environ['DISCORD_BOT_TOKEN']
GUILD_NAME = os.environ['DISCORD_GUILD_NAME']
FILENAME = "role-list.csv"

logging.basicConfig(level=logging.INFO)
intents = discord.Intents.all()
client = discord.Client(intents=intents)

@client.event
async def on_ready():
with open(FILENAME, 'w', newline='') as file:
writer = csv.writer(file)
writer.writerow(["Role Name", "Role ID"])

for guild in client.guilds:
if guild.name == GUILD_NAME:
logging.debug(
f'{client.user} is running in the following server:\n{guild.name} (id: {guild.id})')
roles = guild.roles
for role in roles:
row = [role.name, role.id]
writer.writerow(row)

await client.close()

def main():
client.run(TOKEN)

main()
93 changes: 93 additions & 0 deletions role-list.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Role Name,Role ID
@everyone,858516330432299008
Zeta Faucet Bot,1153797962300919891
IFTTT,1146156880285143233
Zeta Faucet A3,1139301881005494394
Zeta Faucet,1085281015813124259
ChainPatrol,1073653729993162845
o'zbek,1128474912814792838
اللغة العربية,1060645692328136915
தமிழ்,1038189433700225205
filipino,1036738477783531530
Singapore,1148470381750005773
Nigeria,1028744285237039144
italiano,1009562875397947482
azərbaycan,1009562824500072558
indonesian,1009562785941823619
فارسی,1009562743122174094
українська,1009562702877823027
ไทย,1009562663967277166
polskie,1009562621084696727
русский,1009562589203812362
português,1009562548842016768
français,1009562500544602133
türkçe,1009562467061465220
deutsch,1009562405975634062
tiếng-việt,1009562345896431736
한국인,1009562316326572054
हिंदी,1009562251960799344
日本語,1009562210470731838
中文,1009562161040863323
español,1009550011169783839
LVL 30,1038162081586880572
LVL 29,1038161847846699038
LVL 28,1038161797275983942
LVL 27,1038161723347189761
LVL 26,1038161593755762748
LVL 25,1007024295853178991
LVL 24,1007024246570111018
LVL 23,1007024188332199967
LVL 22,1007024099811401730
LVL 21,1006999719530209360
LVL 20,983369185587507260
LVL 19,983369147578720287
LVL 18,983369083661713549
LVL 17,983369018775863296
LVL 16,983368920264233030
LVL 15,968945729785716736
LVL 14,968945629130809424
LVL 13,968945548520476712
LVL 12,968945119321526309
LVL 11,968945049729646612
LVL 10,968944980397793300
LVL 9,968944900227887174
LVL 8,968944829788749834
LVL 7,968944760620458094
LVL 6,968944636280328192
LVL 5,968944297401544766
LVL 4,968944167986270209
LVL 3,968960791619444806
LVL 2,968960696383569930
LVL 1,968960611809656893
🎮⼁Gamer,1023665346743390208
🐸⼁memelord,935824054357737482
👩‍🎨⼁Designer,935841537420558427
🌐⼁Validator,1122981184255840306
🚰 | Faucet access,1108293857537429536
🖥⼁Developer,1106564891566944297
ZETA Assimilated,1065096367241953412
ZETA Beta Tester,1034095093050789948
ZETA Supporter,1031554119099502733
🦸| ZetaNite,1111361873380659270
Most active 👑,936571795597828126
GarticBOT,1010260253897654296
QuizBot,1010269356254560349
Rumble Royale,1033768866809135127
Link3,1043268092584804436
Verified,918337641651519508
Captcha.bot,1101653245388132395
Server Booster,922119057141030943
💼⼁Contributor,1022333707354386443
💼⼁VIP Contributor,1037485998856216586
Referrer,1090081531889975346
🛡️⼁Protectorate,1111736117008531516
🚢⼁Ambassador,923638817527844884
Reaction Roles,935826920510214165
crew3,1031581292019601521
ZetaBot,1094923902230208544
Guild.xyz bot,1161324046680592438
GalxeBot,1161327703966888021
MEE6,1148390677730832448
Team - Announcements,1121120599167742064
Team,902994157889523754
admin,884899483312345118

0 comments on commit 0dfaf52

Please sign in to comment.