You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
```This Discord-Server uses a self-programmed bot, based on Discords own API, to collect and process user data.
3
+
The bot shown as "PantomDataBot#3363" ("z +level" in member list) tracks the following:
4
+
- Number of written messages in every text-channel
5
+
- Length of written messages in every text-channel
6
+
- Giving of reactions to written messages in every text-channel
7
+
- Number of active users and active UserID in every voice-channel
8
+
- Mute-status of every active user in every voice-channel
9
+
- Camera- and LIVE-status of every active user in every voice-channel
10
+
- Every reaction to bot-messages in every text-channel for bot-interaction
11
+
- Time of user-messages in every text-channel
12
+
- User-Messages with "+" prefix in every text-channel
13
+
- Time of given user-roles
14
+
- Time of gained experience-points for being active in voice-channels
15
+
- Every direct-message you send the bot “PantomDataBot#3363“
16
+
17
+
The Bot shown as "PantomDataBot#3363" ("z +level" in member list) DOES NOT track the following:
18
+
- Content of written user-messages in every text-channel without "+" prefix
19
+
- Content of given reactions to any written user-messages in every text-channel
20
+
- Any content of transferred voice or video in voice-channels
21
+
22
+
All named aspects are part of server-own features like getting roles by pressing bot-reactions, banning users in text-channels and gaining roles by leveling. Data is stored and processed combined with Discords User-ID and won’t be hand out to third parties.
23
+
The text-channel “level” features a leaderboard with the usernames and their hours spend on the server, the number of their written messages as well as the amount of gained experience-points by doing it.
24
+
By leaving the server, all user-related data will be deleted from the server after 14 days without rejoining.
25
+
26
+
By clicking on the bot-reaction you accept the named aspects above.
classCommandmod(commands.Cog, name='Bot Mod Commands'):
9
+
"""You need privilage level 1 to use these commands."""
10
+
def__init__(self, bot, helpf, jh, xpf):
11
+
super(Commandmod, self).__init__()
12
+
self.bot=bot
13
+
self.helpf=helpf
14
+
self.jh=jh
15
+
self.xpf=xpf
16
+
17
+
#Adds channel to blacklist
18
+
@commands.command(name='addvoiceblacklist', brief='Adds a voice channel to the blacklist.', description='You need privilege level 1 to use this command. You can add a voice channel to the blacklist. The users in blacklisted channels will not get voice XP. As an input you need the channel id, which you can get by rigth clicking on the channel.')
19
+
asyncdefaddblacklist(self, ctx, channelID):
20
+
message="Your are not permitted to use this command. You need Mod privileges"
message=f"Added {channelName} with id {channelID} to Blacklist. This Voice channel will not be logged."
30
+
else:
31
+
message="Channel is already in Blacklist."
32
+
else:
33
+
message=f"Channel is not in the server {str(server)}"
34
+
author=ctx.author
35
+
awaitself.helpf.log(f"{message} from user {author}",2)
36
+
awaitctx.send(message)
37
+
38
+
#Removes channels from blacklist
39
+
@commands.command(name='removevoiceblacklist', brief='Removes a voice channel to the blacklist.', description='You need privilege level 1 to use this command. You can remove a voice channel from the blacklist. The users in this channel will get voice XP. As an input you need the channel id, which you can get by rigth clicking on the channel.')
40
+
asyncdefremoveblacklist(self, ctx, channelID):
41
+
message="Your are not permitted to use this command. You need Mod privileges"
message=f"Removed {channelName} with id {channelID} from Blacklist. This Voice channel will be logged."
47
+
else:
48
+
message="Channel does not exist or is not in Blacklist"
49
+
author=ctx.author
50
+
awaitself.helpf.log(f"{message} from user {author}",2)
51
+
awaitctx.send(message)
52
+
53
+
#Adds text channel to whitelist
54
+
@commands.command(name='addtextwhitelist', brief='Adds a text channel to the whitelist.', description='You need privilege level 1 to use this command. You can add a text channel to the whitelist. Users writting in channels from the whitelist will get text XP. As an input you need the channel id, which you can get by rigth clicking on the channel.')
55
+
asyncdefaddtextwhitelist(self, ctx, channelID):
56
+
message="Your are not permitted to use this command. You need Mod privileges"
message=f"Added {channelName} with id {channelID} to Whitelist. This Text channel will be logged."
66
+
else:
67
+
message="Channel is already in Whitelist."
68
+
else:
69
+
message=f"Channel is not in the server {str(server)}"
70
+
author=ctx.author
71
+
awaitself.helpf.log(f"{message} from user {author}",2)
72
+
awaitctx.send(message)
73
+
74
+
#Removes text channel from whitelist
75
+
@commands.command(name='removetextwhitelist', brief='Removes a text channel to the whitelist.', description='You need privilege level 1 to use this command. You can remove text channels from the whitelist. Users writting in channels from the whitelist will get not get text XP. As an input you need the channel id, which you can get by rigth clicking on the channel.')
message=f"Removed {channelName} with id {channelID} from Whitelist. This Text channel will not be logged."
83
+
else:
84
+
message="Channel does not exist or is not in Whitelist"
85
+
author=ctx.author
86
+
awaitself.helpf.log(f"{message} from user {author}",2)
87
+
awaitctx.send(message)
88
+
89
+
#TODO: Does not creat new user. Use somehow jh.addNewDataEntry(userID)
90
+
@commands.command(name='getuserdata', brief='Gives VoiceXP, TextXP and writen messages back.', description='You need privilege level 1 to use this command. Returns UserName, UserID, VoiceXP, TextXP and writen messages back. As an input you need the user id, which you can get by rigth clicking on the user.')
91
+
asyncdefgetUserData(self, ctx, userID):
92
+
message="Your are not permitted to use this command. You need Mod privileges"
message=f"User was not in data. Created user: {user.mention}"
103
+
awaitctx.send(message)
104
+
105
+
#TODO: Does not creat new user. Use somehow jh.addNewDataEntry(userID)
106
+
@commands.command(name='setvoicexp',brief='Sets the voiceXP of a user.', description='You need privilege level 1 to use this command. Sets the voiceXP to the given amount. As an input you need the userID, which you can get by rigth clicking on the user, and the value of the XP.')
107
+
asyncdefsetVoiceXP(self, ctx, userID, amount):
108
+
message="Your are not permitted to use this command. You need Mod privileges"
message=f"User was not in data. Created user: {self.bot.get_user(int(userID))}\n"
113
+
self.jh.addNewDataEntry(userID)
114
+
self.jh.data[str(userID)]["Voice"] =str(amount)
115
+
self.jh.saveData()
116
+
message+=f"Set user {str(self.bot.get_user(int(userID)))} voiceXP to{amount}."
117
+
awaitself.helpf.log(f"User {ctx.author} set user {str(self.bot.get_user(int(userID)))} voiceXP to {amount}.",2)
118
+
awaitctx.send(message)
119
+
120
+
#TODO: Does not creat new user. Use somehow jh.addNewDataEntry(userID)
121
+
@commands.command(name='settextxp',brief='Sets the textXP of a user.', description='You need privilege level 1 to use this command. Sets the TextXP to the given amount. As an input you need the userID, which you can get by rigth clicking on the user, and the value of the XP.')
122
+
asyncdefsetTextXP(self, ctx, userID, amount):
123
+
message="Your are not permitted to use this command. You need Mod privileges"
message=f"User was not in data. Created user: {self.bot.get_user(int(userID))}\n"
128
+
self.jh.addNewDataEntry(userID)
129
+
self.jh.data[str(userID)]["Text"] =str(amount)
130
+
self.jh.saveData()
131
+
message+=f"Set user {str(self.bot.get_user(int(userID)))} textXP to {amount}."
132
+
awaitself.helpf.log(f"User {ctx.author} set user {str(self.bot.get_user(int(userID)))} textXP to {amount}.",2)
133
+
awaitctx.send(message)
134
+
135
+
#TODO: Does not creat new user. Use somehow jh.addNewDataEntry(userID)
136
+
@commands.command(name='settextcount',brief='Sets the textCount of a user.', description='You need privilege level 1 to use this command. Sets the TextCount to the given amount. As an input you need the userID, which you can get by rigth clicking on the user, and the value of the XP.')
137
+
asyncdefsetTextCount(self, ctx, userID, amount):
138
+
message="Your are not permitted to use this command. You need Mod privileges"
message+=f"Set user {str(self.bot.get_user(int(userID)))} TextCount to {amount}."
147
+
awaitself.helpf.log(f"User {ctx.author} set user {str(self.bot.get_user(int(userID)))} textCount to {amount}.",2)
148
+
awaitctx.send(message)
149
+
150
+
@commands.command(name='printdata', brief='Prints the Data of the Users', description='You need privilege level 1 to use this command. Prints the Username, userID, level, voiceXP, textXP and textCount off all users on the server.')
151
+
asyncdefprintData(self,ctx):
152
+
message="Your are not permitted to use this command. You need Mod privileges"
iflen(message)+len(messageadd)>2000: #Get around 2000 char discord text limit
171
+
awaitctx.send(message)
172
+
message=""
173
+
message+=messageadd
174
+
print(f"User {ctx.author} prints all data in {ctx.channel}.")
175
+
awaitctx.send(message)
176
+
177
+
@commands.command(name='removeuser', brief='Removes user from data.', description='You need privilege level 1 to use this command. Removes the userID from the data und save it. As an input you need the userID, which you can get by rigth clicking on the user.')
178
+
asyncdefremoveuser(self, ctx, userID):
179
+
message="Your are not permitted to use this command. You need Mod privileges"
0 commit comments