Skip to content

Commit fdd83eb

Browse files
committed
chore: Bump version to 3.1.4 and update interaction data handling
1 parent 04ba4c8 commit fdd83eb

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

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__ = "3.1.3"
4+
__version__ = "3.1.4"
55

66
from .client import *

discordanalytics/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def track_interactions(self, interaction: discord.Interaction):
235235
})
236236

237237
if interaction.type in {InteractionType.application_command, InteractionType.autocomplete}:
238-
interaction_data = next((x for x in self.stats["interactions"]
239-
if x["name"] == interaction.data["name"] and x["type"] == interaction.type.value and x["command_type"] == interaction.data["type"]), None)
238+
interaction_data = next((x for x in self.stats["interactions"]
239+
if x["name"] == interaction.data["name"] and x["type"] == interaction.type.value and x["command_type"] == (interaction.data["type"] or 1)), None)
240240
if interaction_data is not None:
241241
interaction_data["number"] += 1
242242
else:

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "discordanalytics"
77
description = "A Python package for interacting with Discord Analytics API"
8-
version = "3.1.3"
9-
authors = [
10-
{name = "ValDesign", email = "valdesign.dev@gmail.com"}
11-
]
8+
version = "3.1.4"
9+
authors = [{ name = "ValDesign", email = "valdesign.dev@gmail.com" }]
1210
requires-python = ">=3.8"
13-
readme="README.md"
11+
readme = "README.md"
1412
license = { file = "LICENSE" }
1513

1614
[project.urls]
1715
homepage = "https://github.com/DiscordAnalytics/python-package"
18-
issues = "https://github.com/DiscordAnalytics/python-package/issues"
16+
issues = "https://github.com/DiscordAnalytics/python-package/issues"

0 commit comments

Comments
 (0)