I want to fetch a data from another python file everytime i execute the other one

I know that whenever i use from my_file_contains_data.py import data_i_want
i can access the data i want and i can use it for ‘if’ statements.
but in ‘my_file_contains_data.py’ file, the ‘data_i_want’ is a variable that can changes.
and when the ‘data_i_want’ changes, it does not change in the main file i work, it always stays the same value in the beginning.

Here is my codes:
main file:

 from cmds.channelproctection import curstat
 @bot.event
 async def on_guild_channel_delete(channel):
      if channel.guild.id == my_guild_id and curstat==1:
           memberRole = channel.guild.get_role(693197190377766931) # Server's Default Member Role ID.
           async for entry in channel.guild.audit_logs(limit=1, action=discord.AuditLogAction.channel_delete):
                if not entry.user.id == 472911936951156740:
                     try:
                          await entry.user.edit(nick='I hate my Mom.', roles=[memberRole], reason='Deleting a Channel.')
                          await channel.clone(reason=f'Channel re-opened because {entry.user.name} deleted the channel.')
                          chan2=bot.get_channel(my_announcement_channel)
                          await chan2.send(f"@everyone, {entry.user.mention}, deleted **{channel.name}** channel. He hates his mom.")                 
                     except Forbidden:
                          ownerid = bot.get_user(owners[0])
                          chan = await ownerid.create_dm()
                          chan3 = await bot.get_user(my_friends_id).create_dm()
                          await channel.clone(reason=f"@everyone, {entry.user.mention}, deleted **{channel.name}** channel. He hates his mom.")
                          await chan.send(f"{entry.user.name}, removed {channel.name}.")
                          await chan3.send(f"{entry.user.name}, removed {channel.name} ")
      elif channel.guild.id == my_guild_id and curstat==0:
           async for entry in channel.guild.audit_logs(limit=1, action=discord.AuditLogAction.channel_delete):
                if not entry.user.id == 472911936951156740: # VoiceMaster ID
                     ownerid = bot.get_user(owners[0])
                     chan = await ownerid.create_dm()
                     await chan.send(f"Channel protection is off but {entry.user.name}, removed {channel.name}!")
      elif channel.guild.id == IEEM and curstat not in [0, 1]:
           print('there is a huge problem!')
           await bot.close()

channel-protection (a.k.a ‘my_file_contains_data’):

curstat=1

@commands.command(aliases = ["chanprot", 'chapro',"sex"],hidden=True)
@commands.has_guild_permissions(administrator=True)
async def channelprotection(ctx, state : str):
     global curstat
     if state in ["open", "turnon", "on", '1']:
          if not curstat==1:
               curstat = 1
               await ctx.message.add_reaction("✅")
               await ctx.send("Channel protection is on!",reference=ctx.message, mention_author=False)
          else:
               await ctx.message.add_reaction("🖕🏻")
               await ctx.send("Already On.")
     elif state in ['close', 'turnoff', 'off', '0']:
          if not curstat==0:
               curstat = 0
               await ctx.message.add_reaction("✅")
               await ctx.send("Caution, Channel protection is disabled!",reference=ctx.message, mention_author=False)
          else:
               await ctx.message.add_reaction("🖕🏻")
               await ctx.send("Already Off.")
     else:
          await ctx.send("Use open for turning on, use close for turning of.")

async def setup(bot):
    bot.add_command(channelprotection)

When i used turn off command, it gives me a reply but ‘curstat’ variable doesn’t changes so bot still recreates channels when i or someone trys to remove a channel. i tried adding the line from cmds.channelproctection import curstat after event handlers and define function
like this:

@bot.event
     async def on_guild_channel_delete(channel):
          from cmds.channelprotection import curstat
          if channel.guild.id == 693193721612861511 and curstat==1:
...

it worked but i dont think this usage is correct. is this true, did i solve my problem or is there a good and logical way to ‘fix’ this issue?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

I want to fetch a data from another python file everytime i execute the other one

I know that whenever i use from my_file_contains_data.py import data_i_want
i can access the data i want and i can use it for ‘if’ statements.
but in ‘my_file_contains_data.py’ file, the ‘data_i_want’ is a variable that can changes.
and when the ‘data_i_want’ changes, it does not change in the main file i work, it always stays the same value in the beginning.

Here is my codes:
main file:

 from cmds.channelproctection import curstat
 @bot.event
 async def on_guild_channel_delete(channel):
      if channel.guild.id == my_guild_id and curstat==1:
           memberRole = channel.guild.get_role(693197190377766931) # Server's Default Member Role ID.
           async for entry in channel.guild.audit_logs(limit=1, action=discord.AuditLogAction.channel_delete):
                if not entry.user.id == 472911936951156740:
                     try:
                          await entry.user.edit(nick='I hate my Mom.', roles=[memberRole], reason='Deleting a Channel.')
                          await channel.clone(reason=f'Channel re-opened because {entry.user.name} deleted the channel.')
                          chan2=bot.get_channel(my_announcement_channel)
                          await chan2.send(f"@everyone, {entry.user.mention}, deleted **{channel.name}** channel. He hates his mom.")                 
                     except Forbidden:
                          ownerid = bot.get_user(owners[0])
                          chan = await ownerid.create_dm()
                          chan3 = await bot.get_user(my_friends_id).create_dm()
                          await channel.clone(reason=f"@everyone, {entry.user.mention}, deleted **{channel.name}** channel. He hates his mom.")
                          await chan.send(f"{entry.user.name}, removed {channel.name}.")
                          await chan3.send(f"{entry.user.name}, removed {channel.name} ")
      elif channel.guild.id == my_guild_id and curstat==0:
           async for entry in channel.guild.audit_logs(limit=1, action=discord.AuditLogAction.channel_delete):
                if not entry.user.id == 472911936951156740: # VoiceMaster ID
                     ownerid = bot.get_user(owners[0])
                     chan = await ownerid.create_dm()
                     await chan.send(f"Channel protection is off but {entry.user.name}, removed {channel.name}!")
      elif channel.guild.id == IEEM and curstat not in [0, 1]:
           print('there is a huge problem!')
           await bot.close()

channel-protection (a.k.a ‘my_file_contains_data’):

curstat=1

@commands.command(aliases = ["chanprot", 'chapro',"sex"],hidden=True)
@commands.has_guild_permissions(administrator=True)
async def channelprotection(ctx, state : str):
     global curstat
     if state in ["open", "turnon", "on", '1']:
          if not curstat==1:
               curstat = 1
               await ctx.message.add_reaction("✅")
               await ctx.send("Channel protection is on!",reference=ctx.message, mention_author=False)
          else:
               await ctx.message.add_reaction("🖕🏻")
               await ctx.send("Already On.")
     elif state in ['close', 'turnoff', 'off', '0']:
          if not curstat==0:
               curstat = 0
               await ctx.message.add_reaction("✅")
               await ctx.send("Caution, Channel protection is disabled!",reference=ctx.message, mention_author=False)
          else:
               await ctx.message.add_reaction("🖕🏻")
               await ctx.send("Already Off.")
     else:
          await ctx.send("Use open for turning on, use close for turning of.")

async def setup(bot):
    bot.add_command(channelprotection)

When i used turn off command, it gives me a reply but ‘curstat’ variable doesn’t changes so bot still recreates channels when i or someone trys to remove a channel. i tried adding the line from cmds.channelproctection import curstat after event handlers and define function
like this:

@bot.event
     async def on_guild_channel_delete(channel):
          from cmds.channelprotection import curstat
          if channel.guild.id == 693193721612861511 and curstat==1:
...

it worked but i dont think this usage is correct. is this true, did i solve my problem or is there a good and logical way to ‘fix’ this issue?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật