Skip to content

Commit b14c6c2

Browse files
committed
Bump version to 0.0.4 in __init__.py and pyproject.toml and changed count to number
1 parent 618beea commit b14c6c2

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

discordanalytics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__title__ = 'discordanalytics'
22
__author__ = "ValDesign"
33
__license__ = "MIT"
4-
__version__ = "0.0.3"
4+
__version__ = "0.0.4"
55

66
from .client import *

discordanalytics/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def __init__(self, client: discord.Client, api_key: str, debug: bool = False):
3636
"date": datetime.today().strftime("%Y-%m-%d"),
3737
"guilds": 0,
3838
"users": 0,
39-
"interactions": [],
40-
"locales": [],
41-
"guildsLocales": [],
39+
"interactions": [], # {name:str, number:int, type:int}[]
40+
"locales": [], # {locale:str, number:int}[]
41+
"guildsLocales": [], # {locale:str, number:int}[]
4242
"guildMembers": {
4343
"little": 0,
4444
"medium": 0,
@@ -163,51 +163,51 @@ def track_interactions(self, interaction):
163163
found = False
164164
for g in guilds:
165165
if g["locale"] == guild.preferred_locale.value:
166-
g["count"] += 1
166+
g["number"] += 1
167167
found = True
168168
break
169169
if not found:
170170
guilds.append({
171171
"locale": guild.preferred_locale.value,
172-
"count": 1
172+
"number": 1
173173
})
174174
self.stats["guildsLocales"] = guilds
175175

176176
found = False
177177
for data in self.stats["locales"]:
178178
if data["locale"] == interaction.locale.value:
179-
data["count"] += 1
179+
data["number"] += 1
180180
found = True
181181
break
182182
if not found:
183183
self.stats["locales"].append({
184184
"locale": interaction.locale.value,
185-
"count": 1
185+
"number": 1
186186
})
187187

188188
if interaction.type == InteractionType.application_command or interaction.type == InteractionType.autocomplete:
189189
found = False
190190
for data in self.stats["interactions"]:
191191
if data["name"] == interaction.data["name"] and data["type"] == interaction.type.value:
192-
data["count"] += 1
192+
data["number"] += 1
193193
found = True
194194
break
195195
if not found:
196196
self.stats["interactions"].append({
197197
"name": interaction.data["name"],
198-
"count": 1,
198+
"number": 1,
199199
"type": interaction.type.value
200200
})
201201
elif interaction.type == InteractionType.component or interaction.type == InteractionType.modal_submit:
202202
found = False
203203
for data in self.stats["interactions"]:
204204
if data["name"] == interaction.data["custom_id"] and data["type"] == interaction.type.value:
205-
data["count"] += 1
205+
data["number"] += 1
206206
found = True
207207
break
208208
if not found:
209209
self.stats["interactions"].append({
210210
"name": interaction.data["custom_id"],
211-
"count": 1,
211+
"number": 1,
212212
"type": interaction.type.value
213213
})

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "discordanalytics"
77
description = "A Python package for interacting with Discord Analytics API"
8-
version = "0.0.3"
8+
version = "0.0.4"
99
authors = [
1010
{name = "ValDesign", email = "valdesign.dev@gmail.com"}
1111
]

0 commit comments

Comments
 (0)